From 7ada90e1ab86f34e41872ab664570e2bdf8753db Mon Sep 17 00:00:00 2001 From: Jacob Emcken Date: Sat, 10 Dec 2022 20:28:25 +0100 Subject: [PATCH] Include project.clj by default for lein plugin Since the file project.clj is specific to Leiningen projects it seem like a good default. Fixes: #279 --- lein-cljfmt/src/leiningen/cljfmt.clj | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lein-cljfmt/src/leiningen/cljfmt.clj b/lein-cljfmt/src/leiningen/cljfmt.clj index 9df9edcf..8c6ee1c5 100644 --- a/lein-cljfmt/src/leiningen/cljfmt.clj +++ b/lein-cljfmt/src/leiningen/cljfmt.clj @@ -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