Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task: Add clj-kondo config and do a sweep through code #390

Closed
lread opened this issue May 11, 2022 · 0 comments · Fixed by #411
Closed

Task: Add clj-kondo config and do a sweep through code #390

lread opened this issue May 11, 2022 · 0 comments · Fixed by #411

Comments

@lread
Copy link
Collaborator

lread commented May 11, 2022

No description provided.

lread added a commit to lread/etaoin that referenced this issue May 15, 2022
Highlights:
- found 1 bug - `etaoin.ide.api` `:storeTitle` command was calling
`etaoin.api/get-title` with wrong number of args. Fixed.
- found an invalid symbol `num-.` from https://clojure.org/reference/reader:
"Symbols beginning or ending with '.' are reserved by Clojure"
Left as is, but will likely follow up with a name change.

Of note:
- Etaoin uses, and might encourage, the use of `:refer :all` for its
api. Ignoring for now. We can decide how we want to do at some later
date.

Other
- Missing require for `clojure.set` added
- An `if` without else converted to `when`. I like this convention, to me it
conveys that an `if` did not accidentally omit an else condition.
- Unused bindings/paramers prefixed with underscore, unless part of
public API and the unuse is an implementation detail. I find this
convention helpful when glancing at fn signatures, I can quickly tell
what is being used. Mostly left these in as I think they typically
conveyed an interface of sorts, but another option is to omit unused
bindings.
- Unused requires, imports and private vars turfed
- Taught clj-kondo about slingshot macros by bringing in existing clj-kondo
slingshot export config
- Taught clj-kondo about etaoin macros we are using (there are quite a
few!) via `:macroexpand` `:hook`. This is a good first pass, we'll likely
swing around again and create proper clj-kondo hooks in an clj-kondo export
config for fine grained reporting for our users.

Closes clj-commons#390
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant