Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do you want the project.clj file to be included by default for lein projects? #279

Open
jacobemcken opened this issue Dec 5, 2022 · 1 comment · May be fixed by #280
Open

Do you want the project.clj file to be included by default for lein projects? #279

jacobemcken opened this issue Dec 5, 2022 · 1 comment · May be fixed by #280

Comments

@jacobemcken
Copy link

I am seeing this:

(def default-paths ["src" "test" "project.clj"])

But the project.clj file is ignored when running lein 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:

paths (or (seq paths) (filter file-exists? default-paths))]

Do you want a PR changing lein-cljfmt to always include the project.clj file?

I was thinking that it could look something like (changing 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.

@weavejester
Copy link
Owner

This seems a reasonable change.

jacobemcken added a commit to jacobemcken/cljfmt that referenced this issue Dec 10, 2022
jacobemcken added a commit to jacobemcken/cljfmt that referenced this issue Dec 10, 2022
Since the file project.clj is specific to Leiningen projects it seem
like a good default.

Resolves: weavejester#279
@jacobemcken jacobemcken linked a pull request Dec 10, 2022 that will close this issue
jacobemcken added a commit to jacobemcken/cljfmt that referenced this issue Dec 29, 2022
Since the file project.clj is specific to Leiningen projects it seem
like a good default.

Fixes: weavejester#279
jacobemcken added a commit to jacobemcken/cljfmt that referenced this issue Jan 18, 2023
Since the file project.clj is specific to Leiningen projects it seem
like a good default.

Fixes: weavejester#279
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 a pull request may close this issue.

2 participants