Skip to content

Commit

Permalink
Include project.clj by default for lein plugin
Browse files Browse the repository at this point in the history
Since the file project.clj is specific to Leiningen projects it seem
like a good default.

Fixes: weavejester#279
  • Loading branch information
jacobemcken committed Jan 18, 2023
1 parent 1003c67 commit 7ada90e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lein-cljfmt/src/leiningen/cljfmt.clj
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@
(:test-paths project))]
(if (empty? paths)
(leiningen.core.main/abort "No source or test paths defined in project map")
(->> (map io/file paths)
(filter #(and (.exists %) (.isDirectory %)))))))
(->> (conj paths "project.clj")
(map io/file)
(filter #(and (.exists %)
(or (.isDirectory %)
(= "project.clj" (.getName %)))))))))

(defn- execute-command [command options paths]
(case command
Expand Down

0 comments on commit 7ada90e

Please sign in to comment.