API Documentation: | LintOptions |
---|
DSL object for configuring lint options.
Property | Description |
abortOnError | Whether lint should set the exit code of the process if errors are found |
absolutePaths | Whether lint should display full paths in the error output. By default the paths are relative to the path lint was invoked from. |
check | The exact set of issues to check, or null to run the issues that are enabled
by default plus any issues enabled via |
checkAllWarnings | Returns whether lint should check all warnings, including those off by default |
checkReleaseBuilds | Returns whether lint should check for fatal errors during release builds. Default is true. If issues with severity "fatal" are found, the release build is aborted. |
disable | The set of issue id's to suppress. Callers are allowed to modify this collection. |
enable | The set of issue id's to enable. Callers are allowed to modify this collection. To enable a given issue, add the issue ID to the returned set. |
explainIssues | Returns whether lint should include explanations for issue errors. (Note that HTML and XML reports intentionally do this unconditionally, ignoring this setting.) |
htmlOutput | The optional path to where an HTML report should be written |
htmlReport | Whether we should write an HTML report. Default true. The location can be
controlled by |
ignoreWarnings | Returns whether lint will only check for errors (ignoring warnings) |
lintConfig | The default configuration file to use as a fallback |
noLines | Whether lint should include the source lines in the output where errors occurred (true by default) |
quiet | Returns whether lint should be quiet (for example, not write informational messages such as paths to report files written) |
severityOverrides | An optional map of severity overrides. The map maps from issue id's to the corresponding severity to use, which must be "fatal", "error", "warning", or "ignore". |
showAll | Returns whether lint should include all output (e.g. include all alternate locations, not truncating long messages, etc.) |
textOutput | The optional path to where a text report should be written. The special value "stdout" can be used to point to standard output. |
textReport | Whether we should write an text report. Default false. The location can be
controlled by |
warningsAsErrors | Returns whether lint should treat all warnings as errors |
xmlOutput | The optional path to where an XML report should be written |
xmlReport | Whether we should write an XML report. Default true. The location can be
controlled by |
Method | Description |
check(id) | Adds the id to the set of issues to check. |
check(ids) | Adds the ids to the set of issues to check. |
disable(id) | Adds the id to the set of issues to enable. |
disable(ids) | Adds the ids to the set of issues to enable. |
enable(id) | Adds the id to the set of issues to enable. |
enable(ids) | Adds the ids to the set of issues to enable. |
error(id) | Adds a severity override for the given issues. |
error(ids) | Adds a severity override for the given issues. |
fatal(id) | Adds a severity override for the given issues. |
fatal(ids) | Adds a severity override for the given issues. |
ignore(id) | Adds a severity override for the given issues. |
ignore(ids) | Adds a severity override for the given issues. |
warning(id) | Adds a severity override for the given issues. |
warning(ids) | Adds a severity override for the given issues. |
Whether lint should display full paths in the error output. By default the paths are relative to the path lint was invoked from.
The exact set of issues to check, or null to run the issues that are enabled
by default plus any issues enabled via LintOptions.getEnable()
and without issues disabled
via LintOptions.getDisable()
. If non-null, callers are allowed to modify this collection.
Returns whether lint should check all warnings, including those off by default
Returns whether lint should check for fatal errors during release builds. Default is true. If issues with severity "fatal" are found, the release build is aborted.
The set of issue id's to suppress. Callers are allowed to modify this collection.
The set of issue id's to enable. Callers are allowed to modify this collection. To enable a given issue, add the issue ID to the returned set.
Returns whether lint should include explanations for issue errors. (Note that HTML and XML reports intentionally do this unconditionally, ignoring this setting.)
File
htmlOutput
The optional path to where an HTML report should be written
Whether we should write an HTML report. Default true. The location can be
controlled by LintOptions.getHtmlOutput()
.
File
lintConfig
The default configuration file to use as a fallback
Whether lint should include the source lines in the output where errors occurred (true by default)
Returns whether lint should be quiet (for example, not write informational messages such as paths to report files written)
An optional map of severity overrides. The map maps from issue id's to the corresponding severity to use, which must be "fatal", "error", "warning", or "ignore".
Returns whether lint should include all output (e.g. include all alternate locations, not truncating long messages, etc.)
File
textOutput
(read-only)
The optional path to where a text report should be written. The special value "stdout" can be used to point to standard output.
Whether we should write an text report. Default false. The location can be
controlled by LintOptions.getTextOutput()
.
File
xmlOutput
The optional path to where an XML report should be written
Whether we should write an XML report. Default true. The location can be
controlled by LintOptions.getXmlOutput()
.
void
check
(String
id)
Adds the id to the set of issues to check.
void
check
(String
...
ids)
String
...Adds the ids to the set of issues to check.
void
disable
(String
id)
Adds the id to the set of issues to enable.
void
disable
(String
...
ids)
String
...Adds the ids to the set of issues to enable.
void
enable
(String
id)
Adds the id to the set of issues to enable.
void
enable
(String
...
ids)
String
...Adds the ids to the set of issues to enable.
void
error
(String
id)
Adds a severity override for the given issues.
void
error
(String
...
ids)
String
...Adds a severity override for the given issues.
void
fatal
(String
id)
Adds a severity override for the given issues.
void
fatal
(String
...
ids)
String
...Adds a severity override for the given issues.
void
ignore
(String
id)
Adds a severity override for the given issues.
void
ignore
(String
...
ids)
String
...Adds a severity override for the given issues.
void
warning
(String
id)
Adds a severity override for the given issues.
void
warning
(String
...
ids)
String
...Adds a severity override for the given issues.