You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 15, 2022. It is now read-only.
This project is unmantained and archived. If you still need this functionality, please refer to one of the many fabulious forks.
Operation
The runner detects any Clojure or Clojurescript files located in the src and test directories when run.
It can be run in two modes:
check will check all source files and will return a diff of any proposed changes. It also returns a nonzero exit code on any incorrectly formatted files and so is suitable for use in a continuous integration build to enforce code style correctness.
fix will fix any problems it sees in source files and write the updated changes to disk.
Installation
Recommended approach is to use an alias in your deps.edn file, bring in this project as a dependency, and set the main class to the operation you want to perform.
It's advisable to find the most recent sha from this repo for latest features.
Configuration
If you want to automatically scan directories in addition to src and test, then you can specify them in a cljfmt.edn file at the top level of your project directory.
{:dirs ["extra-dir"]}
Alternatively, you can specify extra directories on the command line with the -d flag.
For example, using the alias setup from the example above, if you wanted to scan a dev directory for Clojure sources too then you could do this with clj -A:lint -d dev.
License
Distributed under the Eclipse Public License either version 2.0 or (at your option) any later version.