Skip to content

Commit ac58d3a

Browse files
committed
Import cpplint.py
make cpplint make jslint make lint
1 parent 11ea8da commit ac58d3a

File tree

3 files changed

+3138
-2
lines changed

3 files changed

+3138
-2
lines changed

LICENSE

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ are:
3737
- tools/closure_linter is copyrighted by The Closure Linter Authors and
3838
Google Inc and is released under the Apache license.
3939

40+
- tools/cpplint.py is copyrighted by Google Inc and is released under the
41+
BSD license.
42+
4043

4144
Node's license follows:
4245

Makefile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,18 @@ bench-idle:
130130
sleep 1
131131
./node benchmark/idle_clients.js &
132132

133-
lint:
133+
# TODO lint the test directories and src/node.js
134+
jslint:
134135
@for i in lib/*.js; do \
135136
PYTHONPATH=tools/closure_linter/ python tools/closure_linter/closure_linter/gjslint.py \
136137
--unix_mode --strict --nojsdoc $$i || exit 1; \
137138
done
138139

140+
cpplint:
141+
@for i in src/*.cc src/*.h src/*.c; do \
142+
python tools/cpplint.py $$i || exit 1; \
143+
done
144+
145+
lint: jslint cpplint
139146

140-
.PHONY: lint bench clean docopen docclean doc dist distclean check uninstall install all program staticlib dynamiclib test test-all website-upload
147+
.PHONY: lint cpplint jslint bench clean docopen docclean doc dist distclean check uninstall install all program staticlib dynamiclib test test-all website-upload

0 commit comments

Comments
 (0)