Skip to content

Commit

Permalink
Add clj-kondo integration instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
danielcompton committed Sep 26, 2019
1 parent acde0ae commit ef72111
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,18 @@ The basic syntax is the same as `clojure.core/defn`, but you can optionally add

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

## Cursive integration

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.

## clj-kondo integration

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:

```
{:lint-as {net.danielcompton.defn-spec-alpha/defn schema.core/defn}}
```

## Limitations

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

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.

## Cursive integration

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.

## License

Copyright © 2017-2019 Daniel Compton
Expand Down

0 comments on commit ef72111

Please sign in to comment.