xref: /aosp_15_r20/external/leakcanary2/hooks/pre-push (revision d9e8da70d8c9df9a41d7848ae506fb3115cae6e6)
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