Created
May 21, 2012 22:54
-
-
Save obrok/2765218 to your computer and use it in GitHub Desktop.
Tool to run an appropriate lint on every modified file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Requirements: | |
# - node.js (brew install node || open http://nodejs.org/dist/v0.6.18/node-v0.6.18.pkg) | |
# - jslint (brew install jslint) | |
# - coffeelint (npm install -g coffeelint) | |
# - csslint (npm install -g csslint) | |
# - reek (gem install reek) | |
for file in `git status -s | awk '{ print $2 }'` | |
do | |
echo | |
echo "###############################################################" | |
echo $file | |
echo "###############################################################" | |
case ${file##*.} in | |
rb) | |
reek $file | |
;; | |
js) | |
jsl -process $file | |
;; | |
coffee) | |
coffeelint $file | |
;; | |
css) | |
csslint $file | |
;; | |
esac | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
👍