-
Notifications
You must be signed in to change notification settings - Fork 66
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
Post-cond warning is printed and not treated as warning #283
Comments
Copies some comments from Slack channel to here, for reference: Often when writing linters I do not know all of the cases that the tools.analyzer.jvm analyzed data structures might contain, and rather than try to be exhaustive, I iteratively create test Clojure programs that I think should cause the warning, print out what kind of map tools.analyzer created in that part of the code, and handle it. If I think I get several cases covered, I try it out on the crucible set of Clojure projects and look for more. The print statement quickly alerts me if it encounters a case that Eastwood doesn't cover. It is not a useful Eastwood warning, true, and it is a bit of a wart. Perhaps changing it to a proper Eastwood warning with a type like The docs could explain that such warnings would be great to report as an Eastwood issue (especially if there is a shareable reproducing test case, as usual) so that Eastwood might be enhanced to handle that case better. |
Is this still valid?
This was really difficult to spot among a lot of other linted namespaces but eventually it printed there was 1 warning
|
https://github.com/jonase/eastwood/tree/v1.2.5#wrong-pre-post is an active, maintained linter. From your report, it sounds like it's doing its job just fine - this issue refers to something else. |
dbg wrong-pre-post: condition=(do (println "job-xml:" %) true) line=152 test-ast :op=:do
{:post [(do (println "job-xml:" %) true)]}
looks like this code that is doing it
eastwood/src/eastwood/linters/typos.clj
Line 1034 in 672ed22
src/eastwood/linters/typos.clj:1034
:else
The text was updated successfully, but these errors were encountered: