Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add splint to linting process and update tasks #161

Merged
merged 2 commits into from
Feb 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,6 @@ jobs:

- name: 🧪 Unit tests (bb + test-runner)
run: bb test

- name: 🧪 splint
run: bb style:splint || true
38 changes: 22 additions & 16 deletions bb.edn
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
{:tasks {test (shell "clojure -X:test")
lint (do (run 'style:cljfmt)
(run 'style:cljstyle)
(run 'lint:eastwood)
(run 'lint:kondo))
style:fix (do (run 'style:fix:cljfmt)
(run 'style:fix:cljstyle))
style:cljfmt (shell "cljfmt check")
style:cljstyle (shell "cljstyle check")
style:fix:cljfmt (shell "cljfmt fix")
style:fix:cljstyle (shell "cljstyle fix")
lint:eastwood (shell "clojure -M:test:eastwood")
lint:kondo (shell "clj-kondo --lint test src")
pre-push (do (run 'style:fix)
(run 'test)
(run 'lint))}}
{:tasks {test (shell "clojure -X:test")
; Check style
style:cljfmt (shell "cljfmt check")
style:cljstyle (shell "cljstyle check")
style:splint (shell "lein splint ./src ./test")
lint (do (run 'style:splint)
(run 'style:cljfmt)
(run 'style:cljstyle)
(run 'lint:eastwood)
(run 'lint:kondo))
; Autofix style
fix:cljfmt (shell "cljfmt fix")
fix:cljstyle (shell "cljstyle fix")
fix (do (run 'fix:cljfmt)
(run 'fix:cljstyle))
; Linters
lint:eastwood (shell "clojure -M:test:eastwood")
lint:kondo (shell "clj-kondo --lint test src")
; Local development
pre-push (do (run 'fix)
(run 'lint)
(run 'test))}}
7 changes: 4 additions & 3 deletions project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
:main ^:skip-aot sicp
:target-path "build/%s"
:plugins [[jonase/eastwood "1.4.2"]]
:profiles {:dev {:dependencies [[jonase/eastwood "1.4.2"]]}
:profiles {:dev {:dependencies [[org.clojure/clojure "1.11.1"]
[io.github.noahtheduke/splint "1.12"]]}
:test {:main-opts ["-m" "cognitect.test-runner"]}
:eastwood {:main-opts ["-m" "eastwood.lint" {}]}
:uberjar {:aot :all}
:jvm-opts ["-Dclojure.compiler.direct-linking=true"]})
:jvm-opts ["-Dclojure.compiler.direct-linking=true"]}
:aliases {"splint" ["run" "-m" "noahtheduke.splint"]})
Loading