This is the default formatter for all Avisi Apps projects. It is not configurable. It uses zprint under the hood.
Add fmt
to your project, add the following to your deps.edn
:lint {:extra-deps {avisi-apps/fmt {:git/url "[email protected]:avisi-apps/fmt.git"
:sha "b41d298f52cae6fd91aa908b36699a46ac38bc05"}}
:main-opts ["-m" "avisi-apps.fmt.main" "check"]}
:fix {:main-opts ["-m" "avisi-apps.fmt.main" "fix"]}
clj -A:lint
clj -A:lint:fix
With all the commands you can optionally give a path as a argument for example:
clj -A:lint:fix ../src
- Integrate this with a git commit hook, where we can possibly only lint changed files.
- Make sure that the Intellij configuration is exactly the same.
- Make some kind of Intellij integration where you can format a file with a shortcut.
- Package this project as a GraalVM binary which you can run superfast.