Skip to content

Commit c85e7e2

Browse files
committed
First stab at -X execution
1 parent 518d5a1 commit c85e7e2

File tree

2 files changed

+6
-16
lines changed

2 files changed

+6
-16
lines changed

README.md

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff 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
1717
If 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
2525
Then, 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

src/clj_check/check.clj

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
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)
@@ -28,6 +29,3 @@
2829
(shutdown-agents)
2930
(when-not (zero? failures)
3031
(System/exit failures))))
31-
32-
(defn -main [& source-paths]
33-
(check (or (seq source-paths) ["src"])))

0 commit comments

Comments
 (0)