Skip to content

carlosfiori/dart-auto-const

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Auto Const

This CLI package automatic add the Const keyword in your dart code.

It also removes any unnecessary const keywords.

Installation

 dart pub global activate auto_const

Requirements

This cli uses dart analyze and the rule prefer_const_constructors to identify where add const, this means that you must have enabled this rule in your analysis_optins.yaml, this way:

linter:
  rules:
    - prefer_const_constructors

Running

To run the cli simple execute in the project root:

dart-auto-const

It will analyze your code with dart analyze, add const in all places reported by analyzer and remove any const that is not necessary anymore (also reported by analyzer).

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages