AnalysisOptions class
The string_literal_finder: section of an analysis_options.yaml.
The analyzer plugin framework has no API yet for handing rule specific configuration to a rule (https://github.com/dart-lang/sdk/issues/63098), so the file is located and parsed by hand. Both front ends use this class, so that a glob which silences a warning in the IDE also silences it in CI.
Constructors
-
AnalysisOptions({required String root, required List<
Glob> excludeGlobs, bool debug = false}) - AnalysisOptions.empty(String root)
- Options with no exclusions at all.
Properties
- debug → bool
-
final
-
excludeGlobs
→ List<
Glob> -
Globs, relative to root, of files which should not be reported.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- root → String
-
Directory containing the
analysis_options.yamlthese options came from.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
isExcluded(
String filePath) → bool -
Whether the file at the absolute
filePathis excluded. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
loadFromYaml(
String root, String yamlSource) → AnalysisOptions -
Parses
yamlSource, the contents of ananalysis_options.yamllocated in the directoryroot. Globs are matched relative toroot.