Skip to content

Add cljfmt formatting config and lint/tidy scripts - #952

Draft
danielcompton wants to merge 1 commit into
mainfrom
danielcompton/cljfmt-config
Draft

Add cljfmt formatting config and lint/tidy scripts#952
danielcompton wants to merge 1 commit into
mainfrom
danielcompton/cljfmt-config

Conversation

@danielcompton

Copy link
Copy Markdown
Member

Sets up a cljfmt.edn tuned to the repo's existing code style — it preserves the occasional double blank lines, keeps the compojure route indentation (GET/POST/etc.), and matches the clojure.test and kerodon assertion alignment, so running cljfmt doesn't churn unrelated code. Adds a :cljfmt deps alias along with scripts/lint (check) and scripts/tidy (fix) wrappers, a make tidy target, and a CircleCI "Check formatting" step. Reformats the single outlier block in admin.clj so the codebase passes the check cleanly.

🤖 Generated with Claude Code

Set up a cljfmt.edn tuned to the existing code style (preserves double
blank lines, keeps the compojure route and clojure.test indentation the
repo already uses) so formatting checks don't churn unrelated code. Adds
a :cljfmt deps alias, scripts/lint and scripts/tidy wrappers, a make
tidy target, and a CircleCI step to check formatting. Reformats the one
outlier block in admin.clj to match.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@tobias tobias left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have a cljstyle config (.cljstyle) and script (bin/cljstyle); what would be the advantage of moving to cljfmt?

One thing I like about cljstyle is it is graal-compiled, so is fast enough to run on save from my editor. It is also a fork of cljfmt, so should support the same features (unless cljfmt has moved ahead).

If we do switch, the wrapper scripts should be in bin instead of scripts; scripts is for scripts that get bundled with a release and used on the server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants