At Very Good Ventures, we hold our code to high standards and we want to help you do the same!
Very Good Analysis is an open source package that contains lint rules for Dart and Flutter used internally at Very Good Ventures. It combines the Effective Dart Style Guide and the pedantic package with additional rules to keep your projects in tip-top shape.
About Very Good Analysis
After working on many client projects, we realized that we were continually copying lint rules from different sources and customizing them to fit our needs. To make things more efficient and consistent, we decided to put them all into one repository and make it widely available.
Introducing the Very Good Analysis package!
Some of the key aspects of Very Good Analysis include:
- Stricter type checks enabled: Ensures that the Dart type inference engine does not implicitly cast or choose the dynamic type when the static type cannot be determined.
- Prefer const constructors: Ensures that const constructors are used whenever possible for better performance.
- Prefer final fields: When variable reassignments are not necessary, fields are marked final to ensure that they remain unchanged and promote optimization by the compiler.
- Sort constructors first: Ensures that constructor declarations are placed above all other members to improve readability for developers.
The full list of rules can be found in the Very Good Analysis documentation.
Very Good Analysis Markdown Badge
If you use Very Good Analysis in your project, you can also unlock the Very Good Analysis badge on GitHub. The documentation contains instructions for how to add the badge to your README.md.
Check out the package on pub.dev and give it a like if you find it useful!
Felix Angelov contributed to this article.