Skip to content

Commit

Permalink
Add cljfmt check to CI and format code
Browse files Browse the repository at this point in the history
  • Loading branch information
skydread1 committed Apr 21, 2024
1 parent 45cc73b commit b5c24e4
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ jobs:
uses: DeLaGuardo/setup-clojure@12.1
with:
cli: latest


- name: Verify code base format
run: clojure -T:cljfmt check

- name: Run the clj tests
run: clojure -A:server/test

Expand All @@ -31,7 +34,7 @@ jobs:

- uses: EndBug/add-and-commit@v9
with:
add: 'resources/public/main.js'
add: "resources/public/main.js"
committer_name: GitHub Action
default_author: github_actions
message: 'Compiled the cljs to the js bundle: main.js'
message: "Compiled the cljs to the js bundle: main.js"
3 changes: 3 additions & 0 deletions deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@
:build {:deps {io.github.clojure/tools.build {:git/tag "v0.9.6" :git/sha "8e78bcc"}}
:ns-default build}

:cljfmt {:deps {io.github.weavejester/cljfmt {:git/tag "0.11.2", :git/sha "fb26b22"}}
:ns-default cljfmt.tool}

:outdated {;; Note that it is `:deps`, not `:extra-deps`
:deps {com.github.liquidz/antq {:mvn/version "RELEASE"}}
:main-opts ["-m" "antq.core"]}}}
2 changes: 1 addition & 1 deletion src/loicb/client/core.cljs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(ns loicb.client.core
(:require [loicb.client.core.dom :refer [app]]
(:require [loicb.client.core.dom :refer [app]]
[loicb.client.core.db]
[loicb.client.core.router :as router]
[reagent.dom :as rdom]
Expand Down
2 changes: 1 addition & 1 deletion test/loicb/client/core/db_test.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
:cofx.app/local-store-theme
(fn [coeffects _]
(assoc coeffects :local-store-theme :dark)))

;; Initialize db
(rf/dispatch [:evt.app/initialize]))

Expand Down
4 changes: 2 additions & 2 deletions test/loicb/client/test_runner.cljs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
(ns loicb.client.test-runner
(:require
[figwheel.main.testing :refer-macros [run-tests-async]]
[figwheel.main.testing :refer-macros [run-tests-async]]
;; require all the namespaces that have tests in them
[loicb.client.core.db-test]))
[loicb.client.core.db-test]))

(defn -main [& _]
;; this needs to be the last statement in the main function so that it can
Expand Down

0 comments on commit b5c24e4

Please sign in to comment.