1#!/bin/sh 2 3echo "Running static analysis..." 4 5# Run static analysis tools 6./gradlew detekt 7 8status=$? 9 10if [ "$status" = 0 ] ; then 11 echo "Static analysis found no problems." 12 exit 0 13else 14 echo 1>&2 "Static analysis found violations! Fix them before pushing your code!" 15 echo "See generated reports above or in /<project_dir>/build/reports folder" 16 exit 1 17fi 18