-
Notifications
You must be signed in to change notification settings - Fork 84
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
Remove unnecessary requires #391
Conversation
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## main #391 +/- ##
==========================================
+ Coverage 71.42% 74.56% +3.13%
==========================================
Files 52 52
Lines 2800 2799 -1
Branches 257 283 +26
==========================================
+ Hits 2000 2087 +87
+ Misses 628 522 -106
- Partials 172 190 +18
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
60b68b1
to
1eeb397
Compare
src/kaocha/runner.clj
Outdated
@@ -15,7 +15,7 @@ | |||
[kaocha.output :as output] | |||
[kaocha.plugin :as plugin] | |||
[kaocha.result :as result] | |||
[kaocha.specs :as specs] | |||
#_[kaocha.specs :as specs] ;; required for some reason? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you require namespaces for side effects, you can leave out the alias and clj-kondo won't report it as unused.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When namespaces are required for side-effects, the convention we use is to (require '...)
them below the ns form.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also works (both for clj-kondo and JVM)
9b759b3
to
3a518d1
Compare
This seems slightly more prone to breaking things not covered by tests, so I figure we should wait until #413 is merged. |
Added some comments about some edge cases. Unnecessary requires aren't a major issue, but there are advantages to cleaning them up. This PR silences some warnings from clj-kondo, makes the namespaces easier to understand, and may avoid some circular imports in the future.
Remove an :as to silence clj-kondo warning. Apparently kaocha.specs was added accidentally to kaocha.runner while sorting the imports.
048dd48
to
0b3c4b6
Compare
Released in v1.84.1335 [lambdaisland/kaocha "1.84.1335"] ;; deps.edn
{lambdaisland/kaocha {:mvn/version "1.84.1335"}} ;; project.clj |
Added some comments about some edge cases.
Unnecessary
require
s aren't a major issue, but there are advantages to cleaning them up. This PR silences some warnings fromclj-kondo
, makes the namespaces easier to understand, and may avoid some circular imports in the future.