OSDN Git Service

apilint: Fix API lint issues 2/2
authorAdrian Roos <roosa@google.com>
Wed, 19 Dec 2018 16:11:21 +0000 (17:11 +0100)
committerAdrian Roos <roosa@google.com>
Wed, 19 Dec 2018 16:27:12 +0000 (17:27 +0100)
commit61e3730bc07e04181a01760d2eb1db834a854683
tree086b9db1c7ebb4915b6d878e2c6055856d00e01d
parent2c5cacfd36128f43f5fab4f0665acf69ac049a44
apilint: Fix API lint issues 2/2

Fixes false positives that occur when a class in current.txt is faulty, and an
entry for that class is then added to system-current.txt.

This was so because when parsing the previous revison's system-current.txt, we
did not know about the class and thus didn't look for it in current.txt, and
thus never recorded that the error is preexisting.

To avoid that, we track all classes in system-current.txt with a matching entry
in current.txt in the current revision, and later use that to look up all classes we
may have missed when examining the previous revision.

Test: python tools/apilint/apilint_test.py
Change-Id: Ibe09f1159e351e56b35b8816ce0db760de4ef791
tools/apilint/apilint.py
tools/apilint/apilint_test.py