Static analysis allows you to find problems before executing a single line of code. It’s a powerful tool used to prevent bugs and ensure that code conforms to style guidelines. With the help of the analyzer, you can find simple typos. For example, an accidental semicolon made its way into an if statement:
The analyzer can also help you find more subtle problems. For example, perhaps you've forgotten to close a sink instance:
In the Dart ecosystem, the Dart Analysis Server and other tools use the analyzer package to perform static analysis. You can configure the analyzer using an analysis options file.
For more information, see our new page, Customize Static Analysis.