Merge "Simplify strict updatability linting error message" into main

This commit is contained in:
Treehugger Robot
2024-01-18 11:46:18 +00:00
committed by Gerrit Code Review

View File

@@ -18,6 +18,7 @@
"""This file generates project.xml and lint.xml files used to drive the Android Lint CLI tool.""" """This file generates project.xml and lint.xml files used to drive the Android Lint CLI tool."""
import argparse import argparse
import sys
from xml.dom import minidom from xml.dom import minidom
from ninja_rsp import NinjaRspFileReader from ninja_rsp import NinjaRspFileReader
@@ -159,8 +160,8 @@ def main():
if args.baseline_path: if args.baseline_path:
baseline = minidom.parse(args.baseline_path) baseline = minidom.parse(args.baseline_path)
disallowed_issues = check_baseline_for_disallowed_issues(baseline, args.disallowed_issues) disallowed_issues = check_baseline_for_disallowed_issues(baseline, args.disallowed_issues)
if bool(disallowed_issues): if disallowed_issues:
raise RuntimeError('disallowed issues %s found in lint baseline file %s for module %s' sys.exit('disallowed issues %s found in lint baseline file %s for module %s'
% (disallowed_issues, args.baseline_path, args.name)) % (disallowed_issues, args.baseline_path, args.name))
if args.project_out: if args.project_out: