codox icon indicating copy to clipboard operation
codox copied to clipboard

Lint the code with clj-kondo

Open pbalduino opened this issue 5 years ago • 2 comments

Hi @weavejester

It's basically a cosmetic PR where I used clj-kondo on the source code before sending a feature PR that will follow soon.

clj-kondo uses Batsov's Clojure Style Guide, as defined in CONTRIBUTING guidelines.

Thank you very much, and also all the collaborators, for such awesome tool.

pbalduino avatar Jan 03 '20 16:01 pbalduino

Thanks for the PR. Tools like clj-kondo are good for linting the codebase, but their recommendations shouldn't be applied blindly, as they can be opinionated or even incorrect.

The if/when changes aren't part of the style guide, so should be removed.

The changes to the multimethod arguments are technically part of the style guide, but in this context I think it's better to use full names in order to document the multimethod's expected arguments.

The :use to :refer change is good, but I think a better change would be to use :require :as instead.

Finally, the removal of the mkdirs function should be moved into another commit, as it's not a styling change.

weavejester avatar Jan 04 '20 01:01 weavejester

The if/when changes aren't part of the style guide, so should be removed.

You're right. 🤔

The changes to the multimethod arguments are technically part of the style guide, but in this context I think it's better to use full names in order to document the multimethod's expected arguments.

I agree. When I removed the parameters I realized the clarity was gone.

Finally, the removal of the mkdirs function should be moved into another commit, as it's not a styling change.

Right.

pbalduino avatar Jan 04 '20 02:01 pbalduino