Awesome
Awesome Codemods
A curated list of tools that don't just point out what needs to be done (like static code analyzers or linters) but actually modify your code. This means they can e.g. be used in pre-commit scripts or with tools like silver-platter.
Code formatters are intentionally excluded here but can be found in https://github.com/rishirdua/awesome-code-formatters.
By Environment
General Python C/C++ Go Debian
General
- codespell - check code for common misspellings
Python
- yesqa - Remove unnecessary
#noqa
comments - pyupgrade - upgrade syntax for newer versions of the language
- reorder_python_imports - automatically reorder imports
- teyit - use recommended style for assert statements
- blacken-docs - run black on code fragements in documentation
- setup-py-upgrade - upgrade setup.py to new metadata syntax
- modernize - modernize Python code for eventual Python 3 migration
- autoflake - remove unused imports and unused variables
- ruff - ultra-fast linter that can also fix (some of the) issues it reports
C/C++
- uncrustify - Code formatting along flexible rules
Go
- golangci-lint - linter that can also fix (some of the) issues it reports
Rust
- clippy - linter that can also fix (some of the) issues it reports
Debian
- lintian-brush - Fix issues reported by lintian
- deb-scrub-obsolete - Remove obsolete maintainer script / control file entries
- apply-multiarch-hints - Apply multi-arch fixes from https://multiarch.debian.net/
- deb-new-upstream - Import new upstream releases or snapshots
- cme - Fix various common issues in Debian packages
- drop-mia-uploaders - Remove Missing-In-Action uploaders from Maintainer/Uploader fields
Libraries/Tools for refactoring
- Bowler - modern Python (deprecated, recommends libcst)
- libcst - Python
- rerast - transform Rust code using rules
- refex - refactor expressions in Python
- clang-libastmatcher - CLang AST Matchers
- asttokens - token-preserving AST library for Python
- pasta - code rewriting for Python using AST mutation instead of string templates
Tools for invoking codemods
- pre-commit - Run formatters during git pre-commit
- silver-platter - Run codemods against remote repositories and publish changes (creating PRs/pushing)
- all-repos - Run codemods across a set of local repositories
Fix aggregators
- routine-update - run various codemods for Debian packages
- nitpick - Apply the same pre-defined settings across all your projects
Commercial Platforms
Meta
See also the list of awesome code formatters.
License
This awesome list is licensed under the CC-0 license.