fmt
pants fmt [args]
Autoformat source code.
This goal runs tools that make 'syntactic' changes to source code, where the meaning of the code doesn't (usually) change.
See also:
-
The
fix
goal will run code-editing tools that may make semantic changes, not just syntactic ones. -
The
lint
goal will validate code is formatted, by running these formatters and checking there's no change. -
Documentation about formatters for various ecosystems, such as: Python, Go, JVM, Shell.
Backend: pants.core
Config section: [fmt]