diff --git a/config/pre-push-recommended.sh b/config/pre-push-recommended.sh index aae279a29..fa78dc28d 100755 --- a/config/pre-push-recommended.sh +++ b/config/pre-push-recommended.sh @@ -11,10 +11,21 @@ # You can use it by running this command from the project root: # `ln -s ../../config/pre-push-recommended.sh .git/hooks/pre-push` -# Descriptions for each gradle task below can be found in the -# output of `./gradlew tasks`. +set -e -# Run core checks. +# Run linter in tools/ if it's installed. +if `which pycodestyle > /dev/null`; then + pycodestyle tools +fi + +# Run core checks. Descriptions for each gradle task +# below can be found in the output of `./gradlew tasks`. +# +# Tasks omitted because they take a long time to run: +# - assembling all variants +# - unit test on all variants +# - UI tests +# - android lint (takes a long time to run) ./gradlew -q \ ktlint \ detekt \ @@ -23,9 +34,3 @@ mozilla-detekt-rules:test \ mozilla-lint-rules:test \ testDebug - -# Tasks omitted because they take a long time to run: -# - assembling all variants -# - unit test on all variants -# - UI tests -# - android lint (takes a long time to run)