Open jacobemcken opened 1 year ago
I am seeing this: https://github.com/weavejester/cljfmt/blob/1003c677200e90bc19f7c8d83ea58bd17b900a5e/cljfmt/src/cljfmt/main.clj#L169
But the project.clj file is ignored when running lein cljfmt check (empty configuration), unless I specifically specify it (lein cljfmt check project.clj).
project.clj
lein cljfmt check
lein cljfmt check project.clj
I've narrowed it down to (seq paths) never being empty when the paths come from the Leiningen plugin: https://github.com/weavejester/cljfmt/blob/1003c677200e90bc19f7c8d83ea58bd17b900a5e/cljfmt/src/cljfmt/main.clj#L216
(seq paths)
Do you want a PR changing lein-cljfmt to always include the project.clj file?
lein-cljfmt
I was thinking that it could look something like (changing lein-cljfmt/src/leiningen/cljfmt.clj):
lein-cljfmt/src/leiningen/cljfmt.clj
- (filter #(and (.exists %) (.isDirectory %))))))) + (filter #(and (.exists %) (.isDirectory %))) + (concat '("project.clj"))))))
It seems to be a good fit since the project file is lein specific anyway.
This seems a reasonable change.
I am seeing this: https://github.com/weavejester/cljfmt/blob/1003c677200e90bc19f7c8d83ea58bd17b900a5e/cljfmt/src/cljfmt/main.clj#L169
But the
project.clj
file is ignored when runninglein cljfmt check
(empty configuration), unless I specifically specify it (lein cljfmt check project.clj
).I've narrowed it down to
(seq paths)
never being empty when the paths come from the Leiningen plugin: https://github.com/weavejester/cljfmt/blob/1003c677200e90bc19f7c8d83ea58bd17b900a5e/cljfmt/src/cljfmt/main.clj#L216Do you want a PR changing
lein-cljfmt
to always include theproject.clj
file?I was thinking that it could look something like (changing
lein-cljfmt/src/leiningen/cljfmt.clj
):It seems to be a good fit since the project file is lein specific anyway.