Skip to content

Latest commit

 

History

History
42 lines (30 loc) · 1.12 KB

README.md

File metadata and controls

42 lines (30 loc) · 1.12 KB

Avisi Apps Formatter

This is the default formatter for all Avisi Apps projects. It is not configurable. It uses zprint under the hood.

Getting started

Add aliases

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"]}

Check formatting

clj -A:lint

Fix formatting

clj -A:lint:fix

With all the commands you can optionally give a path as a argument for example:

clj -A:lint:fix ../src

Ideas for the future

  • 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.