You can use the dartanalyzer tool (
bin/dartanalyzer) to statically
analyze your code at the command line, checking for errors and warnings
that are specified in the Dart Language Specification.
Dart Editor performs the same analysis that dartanalyzer does.
Run the analyzer from the top directory of the package. Here’s an example of testing a Dart file.
As the following table shows, the exit code of dartanalyzer tells you whether the code passed analysis.
|0||No issues found|
|1||Hints found (but no warnings or errors)|
You can use the following command-line options with dartanalyzer: