diff options
author | Tor Norbye <tnorbye@google.com> | 2012-02-10 22:18:13 -0800 |
---|---|---|
committer | Tor Norbye <tnorbye@google.com> | 2012-02-13 10:43:47 -0800 |
commit | 3e10306ab1812b2c141e75fb36e2f5c92eeefd28 (patch) | |
tree | a248ca617a3b0563a0c58bc8d0b09dfa4dae6166 /lint/cli | |
parent | 71008df5a5b37666ce3142c2df69fa93391260ac (diff) | |
download | sdk-3e10306ab1812b2c141e75fb36e2f5c92eeefd28.zip sdk-3e10306ab1812b2c141e75fb36e2f5c92eeefd28.tar.gz sdk-3e10306ab1812b2c141e75fb36e2f5c92eeefd28.tar.bz2 |
Make lint process Java jar dependencies
This changeset makes lint properly handle the jar dependency scope for
issues. It also tweaks the API in a few minor ways.
Change-Id: Ibd7b943c9d3ce361e091af8f1e990709bb94d183
Diffstat (limited to 'lint/cli')
-rw-r--r-- | lint/cli/src/com/android/tools/lint/LintCliXmlParser.java | 13 | ||||
-rw-r--r-- | lint/cli/src/com/android/tools/lint/LombokParser.java | 14 | ||||
-rw-r--r-- | lint/cli/src/com/android/tools/lint/Main.java | 2 |
3 files changed, 28 insertions, 1 deletions
diff --git a/lint/cli/src/com/android/tools/lint/LintCliXmlParser.java b/lint/cli/src/com/android/tools/lint/LintCliXmlParser.java index 9ee5ee8..e777e99 100644 --- a/lint/cli/src/com/android/tools/lint/LintCliXmlParser.java +++ b/lint/cli/src/com/android/tools/lint/LintCliXmlParser.java @@ -16,6 +16,7 @@ package com.android.tools.lint; +import com.android.annotations.Nullable; import com.android.tools.lint.client.api.IDomParser; import com.android.tools.lint.client.api.IssueRegistry; import com.android.tools.lint.detector.api.Location; @@ -161,6 +162,7 @@ public class LintCliXmlParser extends PositionXmlParser implements IDomParser { private class LocationHandle implements Handle { private File mFile; private Node mNode; + private Object mClientData; public LocationHandle(File file, Node node) { mFile = file; @@ -176,5 +178,16 @@ public class LintCliXmlParser extends PositionXmlParser implements IDomParser { return null; } + + @Override + public void setClientData(@Nullable Object clientData) { + mClientData = clientData; + } + + @Override + @Nullable + public Object getClientData() { + return mClientData; + } } } diff --git a/lint/cli/src/com/android/tools/lint/LombokParser.java b/lint/cli/src/com/android/tools/lint/LombokParser.java index e1a3c3a..15b1073 100644 --- a/lint/cli/src/com/android/tools/lint/LombokParser.java +++ b/lint/cli/src/com/android/tools/lint/LombokParser.java @@ -16,6 +16,7 @@ package com.android.tools.lint; +import com.android.annotations.Nullable; import com.android.tools.lint.client.api.IJavaParser; import com.android.tools.lint.detector.api.JavaContext; import com.android.tools.lint.detector.api.Location; @@ -113,6 +114,7 @@ public class LombokParser implements IJavaParser { private class LocationHandle implements Handle { private File mFile; private Node mNode; + private Object mClientData; public LocationHandle(File file, Node node) { mFile = file; @@ -124,5 +126,17 @@ public class LombokParser implements IJavaParser { Position pos = mNode.getPosition(); return Location.create(mFile, null /*contents*/, pos.getStart(), pos.getEnd()); } + + + @Override + public void setClientData(@Nullable Object clientData) { + mClientData = clientData; + } + + @Override + @Nullable + public Object getClientData() { + return mClientData; + } } } diff --git a/lint/cli/src/com/android/tools/lint/Main.java b/lint/cli/src/com/android/tools/lint/Main.java index d319648..3c94f93 100644 --- a/lint/cli/src/com/android/tools/lint/Main.java +++ b/lint/cli/src/com/android/tools/lint/Main.java @@ -797,7 +797,7 @@ public class Main extends LintClient { } @Override - public void log(Throwable exception, String format, Object... args) { + public void log(Severity severity, Throwable exception, String format, Object... args) { System.out.flush(); if (!mQuiet) { // Place the error message on a line of its own since we're printing '.' etc |