com.android.tools.lint.checks
Class PropertyFileDetector

java.lang.Object
  extended by com.android.tools.lint.detector.api.Detector
      extended by com.android.tools.lint.checks.PropertyFileDetector

public class PropertyFileDetector
extends com.android.tools.lint.detector.api.Detector

Check for errors in .property files

TODO: Warn about bad paths like sdk properties with ' in the path, or suffix of " " etc


Nested Class Summary
 
Nested classes/interfaces inherited from class com.android.tools.lint.detector.api.Detector
com.android.tools.lint.detector.api.Detector.BinaryResourceScanner, com.android.tools.lint.detector.api.Detector.ClassScanner, com.android.tools.lint.detector.api.Detector.GradleScanner, com.android.tools.lint.detector.api.Detector.JavaScanner, com.android.tools.lint.detector.api.Detector.OtherFileScanner, com.android.tools.lint.detector.api.Detector.ResourceFolderScanner, com.android.tools.lint.detector.api.Detector.XmlScanner
 
Field Summary
static com.android.tools.lint.detector.api.Issue ISSUE
          Property file not escaped
 
Constructor Summary
PropertyFileDetector()
          Constructs a new PropertyFileDetector
 
Method Summary
 boolean appliesTo(com.android.tools.lint.detector.api.Context context, java.io.File file)
           
static java.lang.String getSuggestedEscape(java.lang.String message)
          Returns the escaped string value suggested by the error message which should have been computed by this lint detector.
 void run(com.android.tools.lint.detector.api.Context context)
           
 
Methods inherited from class com.android.tools.lint.detector.api.Detector
afterCheckFile, afterCheckLibraryProject, afterCheckProject, appliesTo, appliesToFolder, appliesToResourceRefs, beforeCheckFile, beforeCheckLibraryProject, beforeCheckProject, checkBinaryResource, checkCall, checkClass, checkFolder, checkInstruction, createJavaVisitor, getApplicableAsmNodeTypes, getApplicableAttributes, getApplicableCallNames, getApplicableCallOwners, getApplicableElements, getApplicableFiles, getApplicableMethodNames, getApplicableNodeTypes, getSpeed, getSpeed, visitAttribute, visitBuildScript, visitDocument, visitElement, visitElementAfter, visitMethod, visitResourceReference
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ISSUE

public static final com.android.tools.lint.detector.api.Issue ISSUE
Property file not escaped

Constructor Detail

PropertyFileDetector

public PropertyFileDetector()
Constructs a new PropertyFileDetector

Method Detail

appliesTo

public boolean appliesTo(@NonNull
                         com.android.tools.lint.detector.api.Context context,
                         @NonNull
                         java.io.File file)
Overrides:
appliesTo in class com.android.tools.lint.detector.api.Detector

run

public void run(@NonNull
                com.android.tools.lint.detector.api.Context context)
Overrides:
run in class com.android.tools.lint.detector.api.Detector

getSuggestedEscape

@Nullable
public static java.lang.String getSuggestedEscape(@NonNull
                                                           java.lang.String message)
Returns the escaped string value suggested by the error message which should have been computed by this lint detector.

Parameters:
message - the error message created by this lint detector
Returns:
the suggested escaped value