1#! /bin/bash
2
3if [[ $PWD != *"/frameworks/base/packages/SystemUI" ]]; then
4    echo "Please run this in frameworks/base/packages/SystemUI" >&2
5    exit 1
6fi
7
8# Empty the baseline file so the baseline-generation run below do not ignore any existing errors.
9echo '' > tools/lint/baseline.xml
10
11lint . -Werror --exitcode --config tools/lint/lint.xml --html /tmp/lint_output.html \
12  --baseline tools/lint/baseline.xml --remove-fixed &
13
14# b/37579990 - The file needs to be removed *while* lint is running
15sleep 0.5
16rm tools/lint/baseline.xml
17
18wait
19