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

Update README and kibit.driver/exec docstring. #259

Merged
merged 1 commit into from
May 13, 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
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,19 +140,17 @@ instead of:
Add the following to your aliases

```clojure
:kibit {:extra-deps {clj-commons/kibit {:mvn/version "0.X.Y"}}
:kibit {:extra-deps {jonase/kibit {:mvn/version "0.1.10"}}
:exec-fn kibit.driver/exec
:exec-args {:paths ["."]}}
```

Then run `clojure -X:kibit`. For more options, please see the
docstring on `kibit.driver/exec`.

**NOTE:** At least Clojure v1.9 and Kibit v0.X.Y are required to use this
**NOTE:** At least Clojure v1.9 and Kibit v0.1.10 are required to use this
exec-fn method.

For alternative options to use kibit from inside deps.edn, check out [this issue](https://github.com/clj-commons/kibit/issues/221)

## Usage from inside Emacs

If you use Emacs for hacking Clojure, here's a way to use kibit from
Expand Down
13 changes: 6 additions & 7 deletions src/kibit/driver.clj
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,13 @@
into an equivalent set of options as expected by run and external-run above.

Please note that rules is not supported. nil is passed to external-run below
which enables all rules (see kibit.rules/all-rules). I don't know what rules
should be. A list of rule names as strings doesn't seem to be it.
which enables all rules (see kibit.rules/all-rules).

**DO NOT** escape the dobule-quotes in deps.edn or on the command-line.

To make use of this, add an alias, e.g. kibit, to deps.edn:

:kibit {:extra-deps {jonase/kibit {:mvn/version \"0.2.0\"}}
:kibit {:extra-deps {jonase/kibit {:mvn/version \"0.1.10\"}}
:exec-fn kibit.driver/exec
:exec-args {:paths [\"src\" \"test\"]}}

Expand All @@ -108,18 +107,18 @@
Additional command-line options can be added in deps.edn or on the
command-line. For example, in deps.edn:

:kibit {:extra-deps {jonase/kibit {:mvn/version \"0.2.0\"}}
:kibit {:extra-deps {jonase/kibit {:mvn/version \"0.1.10\"}}
:exec-fn kibit.driver/exec
:exec-args {:paths [\"src\" \"test\"]
:interactive true}}
:interactive true}}

Or on the command-line:

clojure -X:kibit :interactive true

To use [babashka.cli][babashka.cli], update the kibit aliasn in deps.edn:
To use [babashka.cli][babashka.cli], update the kibit alias in deps.edn:

:kibit {:extra-deps {jonase/kibit {:mvn/version \"0.2.0\"}}
:kibit {:extra-deps {jonase/kibit {:mvn/version \"0.1.10\"}}
org.babashka/cli {:mvn/version \"0.7.51\"}}
:exec-fn kibit.driver/exec
:exec-args {:paths [\"src\" \"test\"]}
Expand Down