Other code review changes
This commit is contained in:
@@ -1044,7 +1044,7 @@ public class LintDriver {
|
||||
}
|
||||
for (File file : files) {
|
||||
Context context = new Context(this, project, main, file);
|
||||
fireEvent(EventType.SCANNING_FILE, context);
|
||||
fireEvent(LintListener.EventType.SCANNING_FILE, context);
|
||||
for (Detector detector : detectors) {
|
||||
if (detector.appliesTo(context, file)) {
|
||||
detector.beforeCheckFile(context);
|
||||
@@ -1437,7 +1437,7 @@ public class LintDriver {
|
||||
if (!sources.isEmpty()) {
|
||||
List<JavaContext> contexts = Lists.newArrayListWithExpectedSize(sources.size());
|
||||
for (File file : sources) {
|
||||
JavaContext context = new JavaContext(this, project, main, file, javaParser);
|
||||
JavaContext context = new JavaContext(this, project, main, file);
|
||||
contexts.add(context);
|
||||
}
|
||||
|
||||
@@ -2377,7 +2377,7 @@ public class LintDriver {
|
||||
return true;
|
||||
}
|
||||
} else if (valueNode instanceof UCallExpression
|
||||
&& ((UCallExpression)valueNode).getKind() == JavaUastCallKinds.ARRAY_INITIALIZER) {
|
||||
&& ((UCallExpression)valueNode).getKind() == UastCallKind.ARRAY_INITIALIZER) {
|
||||
UCallExpression array = (UCallExpression) valueNode;
|
||||
List<UExpression> expressions = array.getValueArguments();
|
||||
for (UExpression arrayElement : expressions) {
|
||||
|
||||
@@ -510,7 +510,7 @@ public abstract class Detector {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void visitFunctionCall(UastAndroidContext context, UCallExpression node) {
|
||||
public void visitCall(UastAndroidContext context, UCallExpression node) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -226,7 +226,7 @@ public enum Scope {
|
||||
/** Scope-set used for detectors which scan all resources */
|
||||
public static final EnumSet<Scope> ALL_RESOURCES_SCOPE = EnumSet.of(ALL_RESOURCE_FILES);
|
||||
/** Scope-set used for detectors which are affected by a single Java source file */
|
||||
public static final EnumSet<Scope> JAVA_FILE_SCOPE = EnumSet.of(SOURCE_FILE);
|
||||
public static final EnumSet<Scope> SOURCE_FILE_SCOPE = EnumSet.of(SOURCE_FILE);
|
||||
/** Scope-set used for detectors which are affected by a single Java class file */
|
||||
public static final EnumSet<Scope> CLASS_FILE_SCOPE = EnumSet.of(CLASS_FILE);
|
||||
/** Scope-set used for detectors which are affected by a single Gradle build file */
|
||||
|
||||
Reference in New Issue
Block a user