Merge "Add api lint to upload checks"
This commit is contained in:
committed by
Android (Google) Code Review
commit
53ef795e28
@@ -7,3 +7,4 @@ checkstyle_hook = ${REPO_ROOT}/prebuilts/checkstyle/checkstyle.py --sha ${PREUPL
|
||||
services/print/
|
||||
services/usb/
|
||||
|
||||
api_lint_hook = ${REPO_ROOT}/frameworks/base/tools/apilint/apilint_sha.sh ${PREUPLOAD_COMMIT}
|
||||
|
||||
@@ -1371,7 +1371,9 @@ if __name__ == "__main__":
|
||||
print
|
||||
"""
|
||||
|
||||
print "%s API style issues %s\n" % ((format(fg=WHITE, bg=BLUE, bold=True), format(reset=True)))
|
||||
for f in sorted(cur_fail):
|
||||
print cur_fail[f]
|
||||
print
|
||||
if len(cur_fail) != 0:
|
||||
print "%s API style issues %s\n" % ((format(fg=WHITE, bg=BLUE, bold=True), format(reset=True)))
|
||||
for f in sorted(cur_fail):
|
||||
print cur_fail[f]
|
||||
print
|
||||
sys.exit(77)
|
||||
|
||||
4
tools/apilint/apilint_sha.sh
Executable file
4
tools/apilint/apilint_sha.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
if git show --name-only --pretty=format: $1 | grep api/ > /dev/null; then
|
||||
python tools/apilint/apilint.py <(git show $1:api/current.txt) <(git show $1^:api/current.txt)
|
||||
fi
|
||||
Reference in New Issue
Block a user