Skip to content

Commit ec4d048

Browse files
committed
Introduce execution (-X)
1 parent 518d5a1 commit ec4d048

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ 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
@@ -27,15 +27,14 @@ Then, run `clj-check` via the declared alias:
2727
For clj versions 1.10.1.697 and greater:
2828
2929
```
30-
clj -M:check
30+
clj -X:check
3131
```
3232
33-
For older versions:
33+
For older version:
3434
3535
```
3636
clj -A:check
3737
```
38-
3938
## License
4039
4140
Copyright © 2018 Shogo Ohta

src/clj_check/check.clj

Lines changed: 3 additions & 2 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)
@@ -30,4 +31,4 @@
3031
(System/exit failures))))
3132

3233
(defn -main [& source-paths]
33-
(check (or (seq source-paths) ["src"])))
34+
(check {:source-paths source-paths}))

0 commit comments

Comments
 (0)