dot_shorthand 1.1.2
dot_shorthand: ^1.1.2 copied to clipboard
Migrate Dart code to dot shorthands (Color.red -> .red). CLI batch rewrite plus an analyzer plugin with a quick fix.
1.1.2 #
- A file with many findings no longer takes seconds per analysis: ignore comments are read once per file, not once per finding.
IgnoreCommentsexposes that per-file filter.
1.1.1 #
--fixdrops a name from an import'sshowlist when the rewrite left it unused, instead of leaving anunused_shown_namewarning behind.
1.1.0 #
- A static const on the context type that holds the same object is rewritten too:
padding: EdgeInsets.zerobecomespadding: .zerothroughEdgeInsetsGeometry.zero. --fixremoves the imports the rewrite left unused or unnecessary.- The command line honours
// ignore: dot_shorthand/prefer_dot_shorthand, the plugin-prefixed form the analyzer accepts. --format jsonhas one shape in scan and fix mode:findings,changedFiles,removedImports.- Fix mode ends with a summary line, a bad flag prints usage and exits 64, and
--versionprints the version.
1.0.0 #
dot_shorthandcommand with scan and--fixmodes.prefer_dot_shorthandanalyzer rule with a quick fix.