Last active
August 29, 2015 14:16
-
-
Save keiththomps/e890e56f4433625d2c88 to your computer and use it in GitHub Desktop.
Finding JS inconsistencies
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
#!/usr/bin/env zsh -i | |
echo "Files containing unnecessarily named functions:" $(ag "\w+\s*:\s*function\s*\w+\s*\(" app/assets/javascripts -l | wc -l) | |
echo "Files containing bad spaces in function expressions:" $(ag "(function \(|function(\s\w+)?\(.*\){)" app/assets/javascripts -l | wc -l) | |
echo "Files containing { on new line:" $(ag "^\s*\{\s*$" app/assets/javascripts -l | wc -l) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment