Skip to content

Library configurations as dependencies for clj-kondo

License

Notifications You must be signed in to change notification settings

clj-kondo/configs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clj-kondo configs

Clj-kondo configurations for libraries, as dependencies.

Including configuration with your own libraries

To give users the best out of the box experience, it is preferred that configurations for libraries are part of those libraries proper. Read here how you can do that. Also see a list of projects here that are already currently doing that.

Gettings configurations from this repo

You can get configurations for your libraries, if they are available in this repo, by adding dependencies to your deps.edn or project.clj. E.g. to add a configuration for Rum:

{:deps {io.github.clj-kondo/config-rum-rum {:mvn/version "<version>"}}}

To always get the newest version, you can use neil:

neil dep add io.github.clj-kondo/config-rum-rum

If you don't already have a .clj-kondo directory, create one.

With the extra dependencies in place, you can run this:

$ clj-kondo --lint $(clojure -Spath) --dependencies --skip-lint --copy-configs

and clj-kondo will copy configurations from the dependencies to your local .clj-kondo directory. For leiningen, replace clojure -Spath with lein classpath.

If you are using clojure-lsp the above will happen automatically.

It is fine to check those configurations into source control if you want to, so everyone who is linting your code with clj-kondo, will get to see the same results.

Naming scheme

Libraries in this repository reflect coordinate names in deps.edn. E.g. configuration for the rum library is available in the configs/rum/rum library.

The configuration dependency on Clojars follows a similar scheme:

{:deps {io.github.clj-kondo/config-<org>-<lib> {:mvn/version "<version>"}}}

Clojars dependency

To include a configuration in your deps.edn or project.clj as a Clojars dependency

{:deps {io.github.clj-kondo/config-rum-rum {:mvn/version "<version>"}}}

Replace <version> with the actual version you want to use.

Git dependency

To include a configuration in your deps.edn as a git dependency:

{:deps {io.github.clj-kondo/config-rum-rum
        {:git/url "https://github.com/clj-kondo/clj-kondo.configs"
         :git/sha "<sha>"
         :deps/root "configs/rum/rum"}}}

Replace <sha> with the actual SHA you want to use.

Note: :deps/root indicates which deps.edn in this repository to use. It is valid to add this repository multiple times with different :deps/roots in your deps.edn.

License

MIT, see LICENSE.

About

Library configurations as dependencies for clj-kondo

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published