Skip to content

Conversation

@akosiaris
Copy link
Contributor

As I am familiarizing myself more with the codebase, I can't help but see the various clj-kondo warnings. This is a series of commits that mostly appease clj-kondo. Note that I haven't touch the clojurescript part of the codebase at all, I am utterly unfamiliar with Clojurescript yet. If this is deemed OK and wanted, I can look also look into adding Github Action based linting on e.g. PRs

Why:
It apparently isn't used anywhere in the parser.clj file but is used in the
outfits.clj file

What:
Move the import to the outfits.clj file
Why:
clj-kondo complains the shield damage and hull-damage are unused
bindings.

What:
Comment them out so that they are still easily accessible if ever
needed
Why:
clj-kondo complains about ->map being referred but never used

What:
Remove it from the refer. If it is ever needed, it can easily be added
back again
Why:

It's used it in the file, to use the data binding, but not explicitly
required. While it works, readability wise, I think it's better to be
explicit

What:
Explicitly require endless-ships.parser
Why:
An if missing an else branch can be surprising and when exists precisely
to cover this use case

What:
Switch if to when
Why:
rename-keys from clojure.set is apparently not used

What:
Remove the require
Why:
Given clj-kondo doesn't complain about the rest of the Clojure codebase
after the last few patches, this is the last hanging fruit. I 've been
pondering over this for a while. Replacing (not (empty?) with idiom
(seq) as per https://clojuredocs.org/clojure.core/empty_q feels a bit
weird. It seems I am not the only one with this opinion per

  clj-kondo/clj-kondo#937

Given the above, I am inclined to just ignore it for now, but happy to
be convinced otherwise

What:
Just instruct clj-kondo to ignore this
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 this pull request may close these issues.

1 participant