File tree Expand file tree Collapse file tree 2 files changed +10
-20
lines changed
Expand file tree Collapse file tree 2 files changed +10
-20
lines changed Original file line number Diff line number Diff line change @@ -10,30 +10,22 @@ Add the following to your `deps.edn`:
1010
1111``` clj
1212:aliases {:check {:extra-deps {athos/clj-check {:git/url " https://github.com/athos/clj-check.git"
13- :sha " 0ca84df1357d71429243b99908303f45a934654c " }}
14- :main-opts [ " -m " " clj-check.check" ]}}
13+ :sha " 518d5a1cbfcd7c952f548e6dbfcb9a4a5faf9062
14+ :exec-fn clj-check.check/check
1515```
1616
1717If your project has its codebase under some directories other than `src` (say `src/clj` and `src/cljc`), specify them as the command line arguments as follows:
1818
1919```clj
2020:aliases {:check {...
21- :main-opts [ " -m " " clj-check.check " " src/clj" " src/cljc" ]}}
21+ :exec-args {:source-paths [ " src/clj" " src/cljc" ]} }}
2222```
2323
2424
2525Then, run `clj-check` via the declared alias:
2626
27- For clj versions 1.10.1.697 and greater:
28-
29- ```
30- clj -M:check
31- ```
32-
33- For older versions:
34-
3527```
36- clj -A :check
28+ clj -X :check
3729```
3830
3931## License
Original file line number Diff line number Diff line change 1717 (doto e .printStackTrace))))
1818
1919(defn check
20- [source-paths]
20+ [{:keys [source-paths]
21+ :or {source-paths [" src" ]}}]
2122 (let [namespaces (bultitude/namespaces-on-classpath
2223 :classpath (map io/file source-paths)
2324 :ignore-unreadable? false )
24- failures (count
25- (sequence
26- (comp (map check-ns) (remove nil?))
27- namespaces))]
28- (shutdown-agents )
25+ failures (count (keep check-ns namespaces))]
2926 (when-not (zero? failures)
3027 (System/exit failures))))
3128
32- (defn -main [& source-paths]
33- (check (or (seq source-paths) [" src" ])))
29+ (defn -main
30+ [& source-paths]
31+ (check {:source-paths source-paths}))
You can’t perform that action at this time.
0 commit comments