run_linters.sh 472 B

1234567891011121314151617181920212223
  1. #!/bin/sh
  2. function redecho() {
  3. tput setaf 1
  4. echo ${1}
  5. tput setaf 0
  6. }
  7. if [ $# -lt "1" ]; then
  8. echo "Usage: run_linters <file to be linted>"
  9. exit 1
  10. fi
  11. redecho "\nJavaScript Lint:"
  12. echo "-octal_number" >> /tmp/jslconf
  13. jsl -nologo -conf /tmp/jslconf -process $1
  14. redecho "\nJSLint (Two octal errors expected):"
  15. jslint --sloppy --stupid --bitwise $1
  16. redecho "\nClosure compiler:"
  17. closure-compiler --summary_detail_level 3 --js_output_file /dev/null $1