Skip to content

Commit ef72111

Browse files
Add clj-kondo integration instructions
1 parent acde0ae commit ef72111

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,18 @@ The basic syntax is the same as `clojure.core/defn`, but you can optionally add
6868

6969
The API is very minimal, there is just a single `defn` macro in the public API.
7070

71+
## Cursive integration
72+
73+
You can tell Cursive to [resolve](https://cursive-ide.com/userguide/macros.html) defn-spec's `defn` macro like the schema `defn` macro. See the [Cursive setup](doc/cursive.md) page for full details on how to do this.
74+
75+
## clj-kondo integration
76+
77+
You can tell Cursive to [resolve](https://cljdoc.org/d/clj-kondo/clj-kondo/CURRENT/doc/configuration#lint-a-custom-macro-like-a-built-in-macro) defn-spec's `defn` macro like the schema `defn` macro. Add the following to your `.clj-kondo/config.edn` file:
78+
79+
```
80+
{:lint-as {net.danielcompton.defn-spec-alpha/defn schema.core/defn}}
81+
```
82+
7183
## Limitations
7284

7385
* Multiple arity functions are not yet supported. [#2](https://github.com/danielcompton/defn-spec/issues/2)
@@ -124,10 +136,6 @@ defn-spec-alpha follows clojure.spec.alpha. When clojure.spec-alpha2 is released
124136

125137
Long-term I would like `defn-spec` to be so stable that it is safe to include as a library dependency. There is only a single macro in this library to minimise the risk consumers are taking on. While I strongly want to keep source compatibility, I can't guarantee this in the short-term. Until this warning is removed I would recommend only using this in applications or libraries where you control all of the consumers. There have also been rumblings that eventually there may be something similar to this built into Clojure's core defn macro.
126138

127-
## Cursive integration
128-
129-
You can tell Cursive to [resolve](https://cursive-ide.com/userguide/macros.html) defn-spec's `defn` macro like the schema `defn` macro. See the [Cursive setup](doc/cursive.md) page for full details on how to do this.
130-
131139
## License
132140

133141
Copyright © 2017-2019 Daniel Compton

0 commit comments

Comments
 (0)