Skip to content

Commit

Permalink
Import cpplint.py
Browse files Browse the repository at this point in the history
make cpplint
make jslint
make lint
  • Loading branch information
ry committed Dec 2, 2010
1 parent 11ea8da commit ac58d3a
Show file tree
Hide file tree
Showing 3 changed files with 3,138 additions and 2 deletions.
3 changes: 3 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ are:
- tools/closure_linter is copyrighted by The Closure Linter Authors and
Google Inc and is released under the Apache license.

- tools/cpplint.py is copyrighted by Google Inc and is released under the
BSD license.


Node's license follows:

Expand Down
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,18 @@ bench-idle:
sleep 1
./node benchmark/idle_clients.js &

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

cpplint:
@for i in src/*.cc src/*.h src/*.c; do \
python tools/cpplint.py $$i || exit 1; \
done

lint: jslint cpplint

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

0 comments on commit ac58d3a

Please sign in to comment.