From 8f1c9521ba7c58699bb51be86c8eb6e67c8dcdf6 Mon Sep 17 00:00:00 2001 From: Roman Volosovskyi Date: Tue, 8 May 2018 14:21:20 +0300 Subject: [PATCH] add cljfmt to project; add pre-push hook; add cljfmt to Jenkinsfile; --- Jenkinsfile | 4 ++++ project.clj | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6849bbab78..a01c2eb4d6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -40,6 +40,10 @@ node ('macos1') { sh 'cd ios && pod install && cd ..' } + stage('Code style checks') { + sh 'lein cljfmt check' + } + stage('Tests') { sh 'lein test-cljs' } diff --git a/project.clj b/project.clj index 4d56bc4155..312ae831a9 100644 --- a/project.clj +++ b/project.clj @@ -13,7 +13,12 @@ [com.cognitect/transit-cljs "0.8.248"] [day8.re-frame/async-flow-fx "0.0.10"]] :plugins [[lein-cljsbuild "1.1.7"] - [lein-re-frisk "0.5.8"]] + [lein-re-frisk "0.5.8"] + [lein-cljfmt "0.5.7"] + [lein-githooks "0.1.0"]] + :githooks {:auto-install true + :pre-commit ["lein cljfmt check"]} + :cljfmt {:indents {letsubs [[:inner 0]]}} :clean-targets ["target/" "index.ios.js" "index.android.js"] :aliases {"prod-build" ^{:doc "Recompile code with prod profile."} ["do" "clean"