codemod 1.0.2 codemod: ^1.0.2 copied to clipboard
Write and run automated code modifications on a codebase. Primarily geared towards updating and refactoring Dart code, but can modify any files.
This directory contains several example codemods:
-
A simple example that inserts license text at the top of a file.
-
A simple example that uses a RegExp to make replacements over all matches.
-
Uses an
AstVisitor
frompackage:analyzer
to remove all elements annotated with@deprecated
. -
Uses an
AstVisitor
and fully resolves all source code information and types for a more advanced modification.