Last active
May 18, 2017 15:26
-
-
Save ifyouseewendy/7b598b36137ffd025ed8e3530a9cf723 to your computer and use it in GitHub Desktop.
A hook script to do code checking, linting and testing before git push. Change pre-push.sh to pre-push before use.
This file contains hidden or 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 | |
# http://misc.flogisoft.com/bash/tip_colors_and_formatting | |
color_echo () { | |
echo -e "\033[1;97;44m==> $1 \033[m" | |
} | |
color_echo "yarn lint" | |
yarn lint | |
color_echo "yarn stylelint" | |
yarn stylelint | |
color_echo "yarn test" | |
yarn test | |
color_echo "yarn run flow check" | |
yarn run flow check | |
color_echo "yamllint -s config/locales/*.yml" | |
yamllint -s config/locales/*.yml | |
color_echo "rubocop -c tmp/rubocop.yml" | |
rubocop -c tmp/rubocop.yml | |
color_echo "rake" | |
rake |
This file contains hidden or 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
inherit_from: | |
- ./../.rubocop.yml | |
AllCops: | |
TargetRubyVersion: 2.3 | |
Exclude: | |
- "config/spring.rb" | |
- "config/initializers/**/*" | |
- "config/environments/**/*" | |
- "db/schema.rb" | |
- "node_modules/**/*" | |
- "bin/**/*" | |
- "vendor/**/*" | |
- "db/migrate/**" | |
Metrics/BlockLength: | |
Exclude: | |
- "test/**/*" | |
- "lib/tasks/**" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment