You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To upvote this issue, give it a thumbs up. See this list for the most upvoted issues.
I have read the Clojure etiquette and will respect it when communicating on this platform.
Is your feature request related to a problem? Please describe.
When editing tests, it can be easy to accidentally remove or not include the comparison function in the given form, leaving a literal in the form position. This is very easy when you don't write a msg so the two values aren't compared but used as form and msg:
(deftestexample-test
(is #{} (set (some-func a b c)))
instead of:
(deftestexample-test
(is (= #{} (set (some-func a b c))))
Describe the solution you'd like
A simple check that the first element to clojure.test/is is a list or symbol, aka not a data "literal".
Describe alternatives you've considered
Do nothing?
Additional context
I have a working hook for this, idk how easy it is to port that to clj-kondo itself.
To upvote this issue, give it a thumbs up. See this list for the most upvoted issues.
Is your feature request related to a problem? Please describe.
When editing tests, it can be easy to accidentally remove or not include the comparison function in the given
form
, leaving a literal in theform
position. This is very easy when you don't write amsg
so the two values aren't compared but used asform
andmsg
:instead of:
Describe the solution you'd like
A simple check that the first element to
clojure.test/is
is a list or symbol, aka not a data "literal".Describe alternatives you've considered
Do nothing?
Additional context
I have a working hook for this, idk how easy it is to port that to clj-kondo itself.
The text was updated successfully, but these errors were encountered: