Browse Source

Import cpplint.py

make cpplint
make jslint
make lint
v0.7.4-release
Ryan Dahl 14 years ago
parent
commit
ac58d3a665
  1. 3
      LICENSE
  2. 11
      Makefile
  3. 3126
      tools/cpplint.py

3
LICENSE

@ -37,6 +37,9 @@ are:
- tools/closure_linter is copyrighted by The Closure Linter Authors and - tools/closure_linter is copyrighted by The Closure Linter Authors and
Google Inc and is released under the Apache license. 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: Node's license follows:

11
Makefile

@ -130,11 +130,18 @@ bench-idle:
sleep 1 sleep 1
./node benchmark/idle_clients.js & ./node benchmark/idle_clients.js &
lint: # TODO lint the test directories and src/node.js
jslint:
@for i in lib/*.js; do \ @for i in lib/*.js; do \
PYTHONPATH=tools/closure_linter/ python tools/closure_linter/closure_linter/gjslint.py \ PYTHONPATH=tools/closure_linter/ python tools/closure_linter/closure_linter/gjslint.py \
--unix_mode --strict --nojsdoc $$i || exit 1; \ --unix_mode --strict --nojsdoc $$i || exit 1; \
done 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

3126
tools/cpplint.py

File diff suppressed because it is too large
Loading…
Cancel
Save