dev cleanup: lint
lread opened this issue · 1 comments
lread commented
Currently
As of this writing, there are minor lint warnings from a default clj-kondo pass.
❯ clj-kondo --lint src test bb deps.edn bb.edn
src/clj_http/lite/core.clj:6:27: warning: Unused import SecureRandom
src/clj_http/lite/core.clj:85:25: warning: unused binding debug
test/clj_http/test/client.clj:3:50: warning: #'clj-http.test.core/current-port is referred but never used
test/clj_http/test/client.clj:7:23: warning: Unused import Arrays
test/clj_http/test/client.clj:75:21: warning: unused binding req
test/clj_http/test/client.clj:81:21: warning: unused binding req
test/clj_http/test/client.clj:87:21: warning: unused binding req
test/clj_http/test/client.clj:113:50: warning: unused binding req
test/clj_http/test/client.clj:145:21: warning: unused binding req
test/clj_http/test/client.clj:151:21: warning: unused binding req
test/clj_http/test/client.clj:158:21: warning: unused binding req
test/clj_http/test/client.clj:162:21: warning: unused binding req
test/clj_http/test/cookies.clj:2:4: warning: use :require with alias or :refer
test/clj_http/test/core.clj:4:14: warning: namespace clojure.pprint is required but never used
test/clj_http/test/core.clj:5:14: warning: namespace clojure.java.io is required but never used
test/clj_http/test/core.clj:5:38: warning: #'clojure.java.io/file is referred but never used
test/clj_http/test/core.clj:8:21: warning: Unused import ByteArrayInputStream
test/setup.clj:4:5: warning: namespace clojure.string is required but never used
test/setup.clj:9:29: warning: unused binding thread
linting took 220ms, errors: 0, warnings: 19
Opinion
To me, this is noise that does not help me to quickly understand if I've introduced new potential issues with my changes.
Proposal
Make a pass to clean up these warnings.
Proposal++
Add a bb lint
task.
Fail CI build on lint errors/warnings.
This one is a personal preference of mine.
I find it helps with code quality.
Next Steps
If no one objects, I shall proceed with proposals.
borkdude commented
Good idea