Skip to content

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

@jacobemcken

Description

@jacobemcken

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions