Skip to content

Commit a128451

Browse files
committed
Import Google's closure_linter
Run with 'make lint'
1 parent 08d8116 commit a128451

46 files changed

Lines changed: 9435 additions & 1 deletion

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

LICENSE

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ are:
3434
- src/platform_darwin_proctitle.cc, has code taken from the Chromium
3535
project copyright Google Inc. and released with the BSD license.
3636

37+
- tools/closure_linter is copyrighted by The Closure Linter Authors and
38+
Google Inc and is released under the Apache license.
39+
3740

3841
Node's license follows:
3942

Makefile

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

133+
lint:
134+
@for i in lib/*.js; do \
135+
PYTHONPATH=tools/closure_linter/ python tools/closure_linter/closure_linter/gjslint.py \
136+
--unix_mode --strict --nojsdoc $$i || exit 1; \
137+
done
133138

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

tools/closure_linter/PKG-INFO

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Metadata-Version: 1.0
2+
Name: closure_linter
3+
Version: 2.2.6
4+
Summary: Closure Linter
5+
Home-page: http://code.google.com/p/closure-linter
6+
Author: The Closure Linter Authors
7+
Author-email: opensource@google.com
8+
License: Apache
9+
Description: UNKNOWN
10+
Platform: UNKNOWN

tools/closure_linter/README

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
This repository contains the Closure Linter - a style checker for JavaScript.
2+
3+
To install the application, run
4+
python ./setup.py install
5+
6+
After installing, you get two helper applications installed into /usr/local/bin:
7+
8+
gjslint.py - runs the linter and checks for errors
9+
fixjsstyle.py - tries to fix errors automatically
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Metadata-Version: 1.0
2+
Name: closure-linter
3+
Version: 2.2.6
4+
Summary: Closure Linter
5+
Home-page: http://code.google.com/p/closure-linter
6+
Author: The Closure Linter Authors
7+
Author-email: opensource@google.com
8+
License: Apache
9+
Description: UNKNOWN
10+
Platform: UNKNOWN
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
README
2+
setup.py
3+
closure_linter/__init__.py
4+
closure_linter/checker.py
5+
closure_linter/checkerbase.py
6+
closure_linter/ecmalintrules.py
7+
closure_linter/ecmametadatapass.py
8+
closure_linter/error_fixer.py
9+
closure_linter/errorrules.py
10+
closure_linter/errors.py
11+
closure_linter/fixjsstyle.py
12+
closure_linter/fixjsstyle_test.py
13+
closure_linter/full_test.py
14+
closure_linter/gjslint.py
15+
closure_linter/indentation.py
16+
closure_linter/javascriptlintrules.py
17+
closure_linter/javascriptstatetracker.py
18+
closure_linter/javascriptstatetracker_test.py
19+
closure_linter/javascripttokenizer.py
20+
closure_linter/javascripttokens.py
21+
closure_linter/statetracker.py
22+
closure_linter/tokenutil.py
23+
closure_linter.egg-info/PKG-INFO
24+
closure_linter.egg-info/SOURCES.txt
25+
closure_linter.egg-info/dependency_links.txt
26+
closure_linter.egg-info/entry_points.txt
27+
closure_linter.egg-info/requires.txt
28+
closure_linter.egg-info/top_level.txt
29+
closure_linter/common/__init__.py
30+
closure_linter/common/error.py
31+
closure_linter/common/erroraccumulator.py
32+
closure_linter/common/errorhandler.py
33+
closure_linter/common/errorprinter.py
34+
closure_linter/common/filetestcase.py
35+
closure_linter/common/htmlutil.py
36+
closure_linter/common/lintrunner.py
37+
closure_linter/common/matcher.py
38+
closure_linter/common/position.py
39+
closure_linter/common/simplefileflags.py
40+
closure_linter/common/tokenizer.py
41+
closure_linter/common/tokens.py
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[console_scripts]
2+
fixjsstyle = closure_linter.fixjsstyle:main
3+
gjslint = closure_linter.gjslint:main
4+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
python-gflags
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
closure_linter

0 commit comments

Comments
 (0)