Skip to content

Commit cfb7182

Browse files
authored
[Fix #470] Prefer deps.edn over pom.xml as project file (#477)
1 parent b24ce76 commit cfb7182

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Change log
22

33
## Unreleased
4+
- [#470](https://github.com/clojure-emacs/clj-refactor.el/issues/470): Choose deps.edn over pom.xml as project file
45

56
## 2.5.1 (2021-02-16)
67

clj-refactor.el

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,7 @@ A new record is created to define this constructor."
815815

816816
(defun cljr--project-dir ()
817817
(or
818-
(thread-last '("project.clj" "build.boot" "pom.xml" "deps.edn" "shadow-cljs.edn")
818+
(thread-last '("project.clj" "build.boot" "deps.edn" "shadow-cljs.edn" "pom.xml")
819819
(mapcar 'cljr--locate-project-file)
820820
(delete 'nil)
821821
car)
@@ -831,11 +831,11 @@ A new record is created to define this constructor."
831831
(and (file-exists-p file) file))
832832
(let ((file (expand-file-name "build.boot" project-dir)))
833833
(and (file-exists-p file) file))
834-
(let ((file (expand-file-name "pom.xml" project-dir)))
835-
(and (file-exists-p file) file))
836834
(let ((file (expand-file-name "deps.edn" project-dir)))
837835
(and (file-exists-p file) file))
838836
(let ((file (expand-file-name "shadow-cljs.edn" project-dir)))
837+
(and (file-exists-p file) file))
838+
(let ((file (expand-file-name "pom.xml" project-dir)))
839839
(and (file-exists-p file) file)))))
840840

841841
(defun cljr--project-files ()

0 commit comments

Comments
 (0)