|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.android.tools.lint.LintCliFlags
@Beta public class LintCliFlags
Flags used by the LintCliClient
NOTE: This is not a public or final API; if you rely on this be prepared to adjust your code for the next tools release.
Field Summary | |
---|---|
static int |
ERRNO_ERRORS
|
static int |
ERRNO_EXISTS
|
static int |
ERRNO_HELP
|
static int |
ERRNO_INVALID_ARGS
|
static int |
ERRNO_SUCCESS
|
static int |
ERRNO_USAGE
|
Constructor Summary | |
---|---|
LintCliFlags()
|
Method Summary | |
---|---|
java.util.List<java.io.File> |
getClassesOverride()
Gets the optional manual override of the class file directories. |
java.io.File |
getDefaultConfiguration()
Returns the default configuration file to use as a fallback |
java.util.Set<java.lang.String> |
getEnabledIds()
Returns the set of issue id's to enable. |
java.util.Set<java.lang.String> |
getExactCheckedIds()
Returns the exact set of issues to check, or null to run the issues that are enabled by default plus any issues enabled via getEnabledIds() and without issues disabled
via getSuppressedIds() . |
java.util.List<java.io.File> |
getLibrariesOverride()
Gets the optional manual override of the library directories. |
java.util.List<Reporter> |
getReporters()
Returns the list of error reports to generate. |
java.util.List<java.io.File> |
getResourcesOverride()
Gets the optional manual override of the resources directories. |
java.util.Map<java.lang.String,com.android.tools.lint.detector.api.Severity> |
getSeverityOverrides()
Returns a map of manually configured severities to use |
java.util.List<java.io.File> |
getSourcesOverride()
Gets the optional manual override of the source directories. |
java.util.Set<java.lang.String> |
getSuppressedIds()
Returns the set of issue id's to suppress. |
boolean |
isCheckAllWarnings()
Returns whether lint should check all warnings, including those off by default |
boolean |
isFatalOnly()
Returns true if we should only check fatal issues |
boolean |
isFullPath()
Whether lint should display full paths in the error output. |
boolean |
isIgnoreWarnings()
Returns whether lint will only check for errors (ignoring warnings) |
boolean |
isQuiet()
Returns whether lint should be quiet (for example, not show progress dots for each analyzed file) |
boolean |
isSetExitCode()
Whether lint should set the exit code of the process if errors are found |
boolean |
isShowEverything()
Returns whether lint should include all output (e.g. |
boolean |
isShowSourceLines()
Whether lint should include the source lines in the output where errors occurred (true by default) |
boolean |
isWarningsAsErrors()
Returns whether lint should treat all warnings as errors |
void |
setCheckAllWarnings(boolean warnAll)
Sets whether lint should check all warnings, including those off by default |
void |
setClassesOverride(java.util.List<java.io.File> classes)
Sets the optional manual override of the class file directories. |
void |
setDefaultConfiguration(java.io.File defaultConfiguration)
Sets the default config file to use as a fallback. |
void |
setExactCheckedIds(java.util.Set<java.lang.String> check)
Sets the exact set of issues to check. |
void |
setFatalOnly(boolean fatalOnly)
Sets whether we should only check fatal issues |
void |
setFullPath(boolean fullPath)
Sets whether lint should display full paths in the error output. |
void |
setIgnoreWarnings(boolean noWarnings)
Sets whether lint will only check for errors (ignoring warnings) |
void |
setLibrariesOverride(java.util.List<java.io.File> libraries)
Sets the optional manual override of the library directories. |
void |
setQuiet(boolean quiet)
Sets whether lint should be quiet (for example, not show progress dots for each analyzed file) |
void |
setResourcesOverride(java.util.List<java.io.File> resources)
Gets the optional manual override of the resource directories. |
void |
setSetExitCode(boolean setExitCode)
Sets whether lint should set the exit code of the process if errors are found |
void |
setSeverityOverrides(java.util.Map<java.lang.String,com.android.tools.lint.detector.api.Severity> severities)
Sets a map of severities to use |
void |
setShowEverything(boolean showAll)
Sets whether lint should include all output (e.g. |
void |
setShowSourceLines(boolean showLines)
Sets whether lint should include the source lines in the output where errors occurred (true by default) |
void |
setSourcesOverride(java.util.List<java.io.File> sources)
Sets the optional manual override of the source directories. |
void |
setWarningsAsErrors(boolean allErrors)
Sets whether lint should treat all warnings as errors |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ERRNO_SUCCESS
public static final int ERRNO_ERRORS
public static final int ERRNO_USAGE
public static final int ERRNO_EXISTS
public static final int ERRNO_HELP
public static final int ERRNO_INVALID_ARGS
Constructor Detail |
---|
public LintCliFlags()
Method Detail |
---|
@NonNull public java.util.Set<java.lang.String> getSuppressedIds()
Issue.getId()
to the returned set.
@NonNull public java.util.Set<java.lang.String> getEnabledIds()
Issue.getId()
to the returned set.
@NonNull public java.util.Map<java.lang.String,com.android.tools.lint.detector.api.Severity> getSeverityOverrides()
@Nullable public java.util.Set<java.lang.String> getExactCheckedIds()
getEnabledIds()
and without issues disabled
via getSuppressedIds()
. If non-null, callers are allowed to modify this collection.
public void setExactCheckedIds(@Nullable java.util.Set<java.lang.String> check)
check
- the set of issue id's to checkpublic boolean isSetExitCode()
public void setSetExitCode(boolean setExitCode)
public boolean isFullPath()
public void setFullPath(boolean fullPath)
public boolean isShowSourceLines()
public void setShowSourceLines(boolean showLines)
@NonNull public java.util.List<Reporter> getReporters()
XmlReporter
and HtmlReporter
.
public boolean isQuiet()
public void setQuiet(boolean quiet)
public boolean isCheckAllWarnings()
public void setCheckAllWarnings(boolean warnAll)
public boolean isIgnoreWarnings()
public void setIgnoreWarnings(boolean noWarnings)
public boolean isWarningsAsErrors()
public void setWarningsAsErrors(boolean allErrors)
public boolean isShowEverything()
public void setShowEverything(boolean showAll)
@Nullable public java.io.File getDefaultConfiguration()
public void setDefaultConfiguration(@Nullable java.io.File defaultConfiguration)
lint.xml
file with severities etc to use when a project does not have more specific information.
To construct a configuration from a File
, use
LintCliClient.createConfigurationFromFile(java.io.File)
.
@Nullable public java.util.List<java.io.File> getSourcesOverride()
Normally, the source, library and resource paths for a project should be computed
by the LintClient
itself, using available project metadata.
However, the user can set the source paths explicitly. This is normally done
when running lint on raw source code without proper metadata (or when using a
build system unknown to lint, such as say make
.
public void setSourcesOverride(@Nullable java.util.List<java.io.File> sources)
Normally, the source, library and resource paths for a project should be computed
by the LintClient
itself, using available project metadata.
However, the user can set the source paths explicitly. This is normally done
when running lint on raw source code without proper metadata (or when using a
build system unknown to lint, such as say make
.
@Nullable public java.util.List<java.io.File> getClassesOverride()
Normally, the source, library and resource paths for a project should be computed
by the LintClient
itself, using available project metadata.
However, the user can set the source paths explicitly. This is normally done
when running lint on raw source code without proper metadata (or when using a
build system unknown to lint, such as say make
.
public void setClassesOverride(@Nullable java.util.List<java.io.File> classes)
Normally, the source, library and resource paths for a project should be computed
by the LintClient
itself, using available project metadata.
However, the user can set the source paths explicitly. This is normally done
when running lint on raw source code without proper metadata (or when using a
build system unknown to lint, such as say make
.
@Nullable public java.util.List<java.io.File> getLibrariesOverride()
Normally, the source, library and resource paths for a project should be computed
by the LintClient
itself, using available project metadata.
However, the user can set the source paths explicitly. This is normally done
when running lint on raw source code without proper metadata (or when using a
build system unknown to lint, such as say make
.
public void setLibrariesOverride(@Nullable java.util.List<java.io.File> libraries)
Normally, the source, library and resource paths for a project should be computed
by the LintClient
itself, using available project metadata.
However, the user can set the source paths explicitly. This is normally done
when running lint on raw source code without proper metadata (or when using a
build system unknown to lint, such as say make
.
@Nullable public java.util.List<java.io.File> getResourcesOverride()
Normally, the source, library and resource paths for a project should be computed
by the LintClient
itself, using available project metadata.
However, the user can set the source paths explicitly. This is normally done
when running lint on raw source code without proper metadata (or when using a
build system unknown to lint, such as say make
.
public void setResourcesOverride(@Nullable java.util.List<java.io.File> resources)
Normally, the source, library and resource paths for a project should be computed
by the LintClient
itself, using available project metadata.
However, the user can set the source paths explicitly. This is normally done
when running lint on raw source code without proper metadata (or when using a
build system unknown to lint, such as say make
.
public boolean isFatalOnly()
public void setFatalOnly(boolean fatalOnly)
fatalOnly
- if true, only check fatal issuespublic void setSeverityOverrides(@NonNull java.util.Map<java.lang.String,com.android.tools.lint.detector.api.Severity> severities)
severities
- map from issue id to severity
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |