What are the default linting analysis options for "flutter analyze"

Viewed 274

I'm using the latest Flutter SDK (2.0.7) in an IDE that uses flutter analyze to perform linting. It's clear that flutter analyze itself relies on dart analyze. It's also clear that there's some default set of rules used unless you specify otherwise using an analysis_options.yaml. But I can't figure out what rules they are. The docs say:

If the analyzer can’t find an analysis options file at the package root, it walks up the directory tree, looking for one. If no file is available, the analyzer defaults to standard checks.

I'd like to know what these "standard checks" are so that I can start with them as a base and add more. Ideally, I'd like to start my own analysis_options.yaml where the first step is to include: the defaults, but I can't figure out how to do this.

There is an analysis_options.yaml in the Flutter SDK source tree that says:

This file contains the analysis options used by Flutter tools, such as IntelliJ, Android Studio, and the flutter analyze command.

But if I add that to my project root, the results are completely different than the default, i.e. what my IDE shows or if I run the flutter analyze command.

0 Answers
Related