datasplash icon indicating copy to clipboard operation
datasplash copied to clipboard

About clj-kondo integration

Open kawas44 opened this issue 2 years ago • 0 comments

Hello,

PR #145 raises concerns about clj-kondo integration. Let's talk about this matter here to know what to implement.

A - For Datasplash users

As a library, Datasplash exposes functions & macro that may raise Kondo warnings. We may/should provide a Kondo config using Kondo extension mechanism. This "opt-in" mechanism allow our users to import "if they want/need" our packaged Kondo config to ease Kondo understanding of our code.

B - For Datasplash developers

As a Clojure project, Datasplash follow coding practices that Kondo can help enforce. We may/should set a Kondo config for CI pipeline and set a lint stage which fails on warnings.

What can we do?

I think that we should provide a config for our users

  • Create a Kondo config and code in resources/clj-kondo.exports/datasplash/datasplash/

I do not think that we need to integrate Kondo to our pipeline

But it is not something complicated and it can help code quality (But what about Clj-Fmt then?).

  • Add clj-kondo as a dev dependency
  • Create a CI Kondo config .clj-kondo/ci-config.edn and define project linting rules
  • Configure Github Worflow to run clj-kondo and fail on warnings

I do think that we should remove the current Kondo config file

This user config file should be ignored and everything user related under .clj-kondo as well. This config file should be edited as needed by developers themself.

  • Remove the current .clj-kondo/config.edn
  • Configure .gitignore to ignore everything under .clj-kondo/

What do you think?

Regards Kawas

kawas44 avatar Mar 13 '23 21:03 kawas44