Skip to content

Commit 0e56314

Browse files
committed
Add a clj-kondo config export
Users of rewrite-clj can now opt in to import clj-kondo config for its public API. Special linting config is currently for edit and subedit threading macros included in the zip API. The clj-kondo config should be available when rewrite-clj is used from jar, local:root or git:url. Closes #146
1 parent e9e6c14 commit 0e56314

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

CHANGELOG.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ For a list of breaking changes see link:#v1-breaking[breaking changes].
1616

1717
=== Unreleased
1818

19+
* rewrite-clj now exports clj-kondo config for its public API https://github.com/clj-commons/rewrite-clj/issues/146[#146]
20+
1921
=== v1.0.605-alpha
2022

2123
* rewrite-clj now understands the `#!` comment, a construct often used in scripts https://github.com/clj-commons/rewrite-clj/issues/145[#145]

deps.edn

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{:paths ["src"]
1+
{:paths ["src" "resources"]
22

33
:deps {org.clojure/clojure {:mvn/version "1.9.0"}
44
org.clojure/tools.reader {:mvn/version "1.3.5"}}
@@ -22,6 +22,8 @@
2222
:clj-kondo {:extra-deps {clj-kondo/clj-kondo {:mvn/version "2021.04.23"}}
2323
:main-opts ["-m" "clj-kondo.main"]}
2424

25+
26+
2527
:test-common {:extra-deps {org.clojure/test.check {:mvn/version "1.1.0"}}
2628
:extra-paths ["test"]}
2729

@@ -100,6 +102,8 @@
100102
:jar {:replace-deps {com.github.seancorfield/depstar {:mvn/version "2.0.216"}}
101103
:exec-fn hf.depstar/jar
102104
:exec-args {:jar "target/rewrite-clj.jar"
105+
:paths-only true
106+
:verbose true
103107
:jar-type :thin}}
104108

105109
:deploy {:replace-deps {slipset/deps-deploy {:mvn/version "0.1.5"}}
@@ -120,4 +124,3 @@
120124
org.slf4j/slf4j-simple {:mvn/version "1.7.30"} ;; to rid ourselves of logger warnings
121125
}
122126
:main-opts ["-m" "antq.core"]}}}
123-
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{:lint-as
2+
{rewrite-clj.zip/subedit-> clojure.core/->
3+
rewrite-clj.zip/subedit->> clojure.core/->>
4+
rewrite-clj.zip/edit-> clojure.core/->
5+
rewrite-clj.zip/edit->> clojure.core/->>}}

0 commit comments

Comments
 (0)