-
Notifications
You must be signed in to change notification settings - Fork 133
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
Faulty rule for not empty #230
Comments
You're correct that these two expressions will return different things. The theory behind this is that in usage, The docstring for
which is where the rule probably came from. |
I can raise a PR to fix this rule.. this rule only works if the expression is used inside a conditional (e.g. if, when, etc.). but when it is used outside a conditional then it will not be same result.. inside a conditional... outside a conditional... |
I think this would probably need to be a configurable rule, there are also lots of conditionals to check for (including custom ones). I'm probably more inclined to leave it for now, but do you have a real-world example you could show? That might help give me some more context. |
I don't currently have a real world example to show, but I think the example I gave above commonly happen in day to day work. I just found it strange that kibit suggested it. Would replacing line 17 of collections.clj with |
Maybe? I'm a little bit conflicted here TBH. |
what do the other maintainers think about my suggested change? |
any update on this one? |
I'm going to have put this in the hammock to think about. I don't have a lot of time to put into kibit at the moment. |
There is a faulty rule for
(not (empty? coll))
. it suggests(seq coll)
...Am I right to say that these two expressions should be referential transparent?
The text was updated successfully, but these errors were encountered: