author | Daniel Hans <Daniel.M.Hans@gmail.com> |
Tue, 03 Nov 2009 02:10:47 +0100 | |
changeset 3076 | 11d5fa052ad1 |
parent 3065 | c7c5212ba840 |
permissions | -rwxr-xr-x |
3065
c7c5212ba840
Script to run JSLint over JS files to check JS code quality.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff
changeset
|
1 |
#!/bin/bash |
c7c5212ba840
Script to run JSLint over JS files to check JS code quality.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff
changeset
|
2 |
#Requires java installed |
c7c5212ba840
Script to run JSLint over JS files to check JS code quality.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff
changeset
|
3 |
|
c7c5212ba840
Script to run JSLint over JS files to check JS code quality.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff
changeset
|
4 |
echo "JSLINT: running jslint" |
c7c5212ba840
Script to run JSLint over JS files to check JS code quality.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff
changeset
|
5 |
|
c7c5212ba840
Script to run JSLint over JS files to check JS code quality.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff
changeset
|
6 |
JS_DIRECTORY="../app/soc/content/js" |
c7c5212ba840
Script to run JSLint over JS files to check JS code quality.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff
changeset
|
7 |
JSLINT="../thirdparty/jslint/jslint.js" |
c7c5212ba840
Script to run JSLint over JS files to check JS code quality.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff
changeset
|
8 |
RHINO="../thirdparty/shrinksafe/js.jar" |
c7c5212ba840
Script to run JSLint over JS files to check JS code quality.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff
changeset
|
9 |
|
c7c5212ba840
Script to run JSLint over JS files to check JS code quality.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff
changeset
|
10 |
for dir in $(find $JS_DIRECTORY -type d); do |
c7c5212ba840
Script to run JSLint over JS files to check JS code quality.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff
changeset
|
11 |
for i in $(find $dir/*.js -type f); do |
c7c5212ba840
Script to run JSLint over JS files to check JS code quality.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff
changeset
|
12 |
echo "JSLINT: Processing $i" |
c7c5212ba840
Script to run JSLint over JS files to check JS code quality.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff
changeset
|
13 |
java -jar $RHINO $JSLINT $i |
c7c5212ba840
Script to run JSLint over JS files to check JS code quality.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff
changeset
|
14 |
done |
c7c5212ba840
Script to run JSLint over JS files to check JS code quality.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff
changeset
|
15 |
done |
c7c5212ba840
Script to run JSLint over JS files to check JS code quality.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff
changeset
|
16 |
|
c7c5212ba840
Script to run JSLint over JS files to check JS code quality.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff
changeset
|
17 |
echo "JSLINT: process finished" |