Created
May 8, 2015 08:03
-
-
Save senthilnayagam/7af18c65104e160f6251 to your computer and use it in GitHub Desktop.
ruby syntax checker
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
git ls-files | grep '\.rb$' | xargs -I FILE -- sh -c 'echo FILE ; ruby -c FILE ' |
I learnt how to pass arguments to multiple commands when using xargs
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this can also be modified with 'ruby -c' replaced with 'python -m py_compile' to syntax check for python as well