Analysis
Analysis is run as part of the Fuchsia build.
For each dart_library target, an analysis script gets
also generated in the output directory under:
Running this script will perform an analysis of the target's sources.
Note that other templates usually define a Dart library they build upon. For
example, a flutter_app //foo/bar will yield a //foo/bar:bar_dart_library
target that can also be analyzed.
As with standard Dart packages, analysis options are defined in an
analysis_options.yaml file, which must be placed at the package root.
This file may refer to a common set of options by way of an include directive:
A canonical set is available at //analysis_options.yaml It is customary to merely include that set from a local options file:
Analysis may be disabled altogether for a given target with:
The //scripts/run-dart-action.py script makes it easy to run the analysis over
multiple targets:
Regular analyzer flags may also be passed:
This holds true for the individual analysis scripts.