https://github.com/clj-kondo/clj-kondo-bb
Invoke clj-kondo from babashka scripts!
https://github.com/clj-kondo/clj-kondo-bb
babashka clj-kondo clojure
Last synced: 4 months ago
JSON representation
Invoke clj-kondo from babashka scripts!
- Host: GitHub
- URL: https://github.com/clj-kondo/clj-kondo-bb
- Owner: clj-kondo
- License: epl-1.0
- Created: 2023-01-24T16:20:35.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-07T15:38:24.000Z (6 months ago)
- Last Synced: 2025-06-04T03:25:27.839Z (4 months ago)
- Topics: babashka, clj-kondo, clojure
- Language: Clojure
- Homepage:
- Size: 19.5 KB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# clj-kondo-bb
Invoke [clj-kondo](https://github.com/clj-kondo/clj-kondo) from babashka scripts!
## Install
Add this dependency to `bb.edn` or `deps.edn` (for bb libraries):
``` clojure
{:deps {io.github.clj-kondo/clj-kondo-bb {:git/tag "v2023.01.20" :git/sha "adfc7df"}}}
```You can invoke clj-kondo as a babashka one-liner like this:
``` clojure
bb -Sdeps '{:deps {io.github.clj-kondo/clj-kondo-bb ...}}' -x clj-kondo.core/exec --lint src
```You can add this library along with JVM clj-kondo without causing conflicts.
## Usage
In a babaska script:
``` clojure
(require '[clj-kondo.core :as clj-kondo])(let [{:keys [summary] :as results} (clj-kondo/run! {:lint ["src"]})]
(clj-kondo/print! results)
(when (or (pos? (:warning summary))
(pos? (:error summary)))
(throw (ex-info "Lint errors" {:babashka/exit 1}))))
```## License
Copyright © 2019 - 2023 Michiel Borkent
Distributed under the EPL License, same as Clojure. See LICENSE.