From 7894d58311a0019e9429eae8838c3ec48cdd1a16 Mon Sep 17 00:00:00 2001 From: jackqdyulei Date: Fri, 15 Sep 2017 10:23:47 -0700 Subject: Disable LintError in color check Lint will by default prompt LintError if no class files found. However class files is not the focus in color lint check, so this cl disable LintError. Bug: 32750778 Test: manually upload the cl and see the check result Change-Id: I2d17bc852bc3f0d0a19938cc92b4ac07e9efcadb --- README.md | 1 + checkcolor.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a7f26c6..6ed4305 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,7 @@ However, if you need to bypass the check, please update the `baseline.xml` by ru command in package root folder(i.e. package/app/Settings/) ``` +export ANDROID_LINT_JARS=$(gettop)/prebuilts/checkcolor/checkcolor.jar lint --check HardCodedColor --xml color-check-baseline.xml . ``` diff --git a/checkcolor.py b/checkcolor.py index 048feb3..9e62d3d 100755 --- a/checkcolor.py +++ b/checkcolor.py @@ -64,8 +64,8 @@ def RunCheckOnProject(root): try: baseline = os.path.join(root, LINT_BASELINE_FILENAME) - check = subprocess.Popen(['lint', '--check', 'HardCodedColor', '--baseline', - baseline, '--exitcode', TMP_FOLDER], + check = subprocess.Popen(['lint', '--check', 'HardCodedColor', '--disable', 'LintError', + '--baseline', baseline, '--exitcode', TMP_FOLDER], stdout=subprocess.PIPE, env=checkcolor_env) stdout, _ = check.communicate() exitcode = check.returncode -- cgit v1.2.3