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"