LintRule class abstract
A base class for plugins to define emit warnings/errors/infos.
For creating assists inside Dart files, see DartLintRule. Suclassing LintRule can be helpful if you wish to implement assists for non-Dart files (yaml, json, ...)
For usage information, see https://github.com/invertase/dart_custom_lint/blob/main/docs/lints.md
- Implementers
- Annotations
-
- @immutable
Constructors
Properties
- code → LintCode
-
The LintCode that this LintRule may emit.
final
- enabledByDefault → bool
-
Whether the lint rule is on or off by default in an empty analysis_options.yaml
no setter
-
filesToAnalyze
→ List<
String> -
A list of glob patterns matching the files that run cares about.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getFixes(
) → List< Fix> - Obtains the list of Fix associated with this LintRule.
-
isEnabled(
CustomLintConfigs configs) → bool - Checks whether this lint rule is enabled in a configuration file.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
run(
CustomLintResolver resolver, ErrorReporter reporter, CustomLintContext context) → void - Emits lints for a given file.
-
startUp(
CustomLintResolver resolver, CustomLintContext context) → Future< void> - Emits lints for a given file.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited