Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 53b2a73c authored by Jason Monk's avatar Jason Monk
Browse files

Add api lint to upload checks

Currently will never block upload, only considered a warning, but
will print out any lint issues discovered.

Test: do an upload
Bug: 69115822
Change-Id: I69b8e5a3f92ac28ee3c954408e88a1056c33af65
parent ae5eb83a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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}
+6 −4
Original line number Diff line number Diff line
@@ -1371,7 +1371,9 @@ if __name__ == "__main__":
            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 −0
Original line number Diff line number Diff line
#!/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