Fix minor issues in updatability lint CLs.
Test: TreeHugger Bug: 182349282 Change-Id: Ifae282d51b088d0562605b41a09696d75c5138f1
This commit is contained in:
parent
be1c47b216
commit
3c87b1df11
2 changed files with 7 additions and 6 deletions
|
@ -261,6 +261,7 @@ func (l *linter) writeLintProjectXML(ctx android.ModuleContext, rule *android.Ru
|
|||
cmd.FlagForEachArg("--fatal_check ", l.properties.Lint.Fatal_checks)
|
||||
|
||||
if BoolDefault(l.properties.Lint.Strict_updatability_linting, false) {
|
||||
// Verify the module does not baseline issues that endanger safe updatability.
|
||||
if baselinePath := l.getBaselineFilepath(ctx); baselinePath.Valid() {
|
||||
cmd.FlagWithInput("--baseline ", baselinePath.Path())
|
||||
cmd.FlagForEachArg("--disallowed_issues ", updatabilityChecks)
|
||||
|
|
|
@ -144,12 +144,12 @@ def check_baseline_for_disallowed_issues(baseline, forced_checks):
|
|||
if issues_element.tagName != 'issues':
|
||||
raise RuntimeError('expected issues tag at root')
|
||||
issues = issues_element.getElementsByTagName('issue')
|
||||
disallwed = set()
|
||||
disallowed = set()
|
||||
for issue in issues:
|
||||
id = issue.getAttribute('id')
|
||||
if id in forced_checks:
|
||||
disallwed.add(id)
|
||||
return disallwed
|
||||
disallowed.add(id)
|
||||
return disallowed
|
||||
|
||||
|
||||
def main():
|
||||
|
@ -158,10 +158,10 @@ def main():
|
|||
|
||||
if args.baseline_path:
|
||||
baseline = minidom.parse(args.baseline_path)
|
||||
diallowed_issues = check_baseline_for_disallowed_issues(baseline, args.disallowed_issues)
|
||||
if bool(diallowed_issues):
|
||||
disallowed_issues = check_baseline_for_disallowed_issues(baseline, args.disallowed_issues)
|
||||
if bool(disallowed_issues):
|
||||
raise RuntimeError('disallowed issues %s found in lint baseline file %s for module %s'
|
||||
% (diallowed_issues, args.baseline_path, args.name))
|
||||
% (disallowed_issues, args.baseline_path, args.name))
|
||||
|
||||
if args.project_out:
|
||||
with open(args.project_out, 'w') as f:
|
||||
|
|
Loading…
Reference in a new issue