Skip to main content

dot_shorthand 1.1.2 copy "dot_shorthand: ^1.1.2" to clipboard
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. IgnoreComments exposes that per-file filter.

1.1.1 #

  • --fix drops a name from an import's show list when the rewrite left it unused, instead of leaving an unused_shown_name warning behind.

1.1.0 #

  • A static const on the context type that holds the same object is rewritten too: padding: EdgeInsets.zero becomes padding: .zero through EdgeInsetsGeometry.zero.
  • --fix removes 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 json has 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 --version prints the version.

1.0.0 #

  • dot_shorthand command with scan and --fix modes.
  • prefer_dot_shorthand analyzer rule with a quick fix.
1
likes
150
points
3.43k
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Migrate Dart code to dot shorthands (Color.red -> .red). CLI batch rewrite plus an analyzer plugin with a quick fix.

Repository (GitHub)
View/report issues

Topics

#lint #analyzer-plugin #codemod #dot-shorthands #flutter

License

MIT (license)

Dependencies

analysis_server_plugin, analyzer, analyzer_plugin, args, glob, path

More

Packages that depend on dot_shorthand