Jason Monk fc10364bde Add scripts to run lint on sysui
The run_lint script takes 2 params, the first is top of tree, the
second is a git change SHA. Only if the change contains changes to
sysui does the lint get run (this allows it to not affect other
uploads as a preupload hook).

Test: ./tools/lint/run_lint.sh $ANDROID_BUILD_TOP <SHA>
Change-Id: Id23b879610b3d33c5bf9e47812f0a85f6aeffdde
2018-08-28 14:35:15 -04:00

19 lines
543 B
Bash
Executable File

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