Skip to content

Commit

Permalink
(SERVER-893) Adopt pl-clojure-style
Browse files Browse the repository at this point in the history
This commit adds cljfmt as a valid lein alias which will defer to the
plugin lein-cljfmt using the pl-clojure-style repo's styles.

We use a git submodule approach to pulling in pl-clojure-style to ease
the ability in the future of using the tool within an automated process
(e.g. travis-ci) and because of significant use of submodules in other
puppet labs clj projects.
  • Loading branch information
justinstoller committed Mar 30, 2016
1 parent 5d1c75e commit 4130a09
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "ext/pl-clojure-style"]
path = ext/pl-clojure-style
url = git://github.com/puppetlabs/pl-clojure-style.git
1 change: 1 addition & 0 deletions ext/pl-clojure-style
Submodule pl-clojure-style added at dbfe1e
9 changes: 7 additions & 2 deletions project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,20 @@
:sign-releases false}]]

;; Convenience for manually testing application shutdown support - run `lein test-external-shutdown`
:aliases {"test-external-shutdown" ["trampoline" "run" "-m" "examples.shutdown-app.test-external-shutdown"]}
:aliases {"cljfmt" ["with-profile" "+cljfmt" "cljfmt"]
"test-external-shutdown" ["trampoline" "run" "-m" "examples.shutdown-app.test-external-shutdown"]}

;; By declaring a classifier here and a corresponding profile below we'll get an additional jar
;; during `lein jar` that has all the code in the test/ directory. Downstream projects can then
;; depend on this test jar using a :classifier in their :dependencies to reuse the test utility
;; code that we have.
:classifiers [["test" :testutils]]

:profiles {:dev {:source-paths ["examples/shutdown_app/src"
:profiles {:cljfmt {:plugins [[lein-cljfmt "0.3.0"]
[lein-parent "0.2.1"]]
:parent-project {:path "ext/pl-clojure-style/project.clj"
:inherit [:cljfmt]}}
:dev {:source-paths ["examples/shutdown_app/src"
"examples/java_service/src/clj"]
:java-source-paths ["examples/java_service/src/java"]
:dependencies [[spyscope "0.1.4"]
Expand Down

0 comments on commit 4130a09

Please sign in to comment.