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
Reduce undesirable :constant-test linter warnings #111
Comments
FTR I'm using Korma for DB access and expressions like this:
yield this warning:
with eastwood |
Thanks for the report. Yes, this is due to the change that fixed issue #93. While it eliminated some unwanted warnings, it also introduced new ones in cases like this. I have created a new issue #114 for this, since it is different than what I thought would be a good solution, which is issue #21, but that issue does not include the capability to selectively disable warnings in library code that you would prefer not to edit. |
ddossot: I added the lines at the link to a new configuration file that will be part of Eastwood in the next release, version 0.2.1. It is not in any release yet as of this date. It should disable the kind of warnings you mention above when using Korma. https://github.com/jonase/eastwood/blob/master/resource/config.clj#L136-L183 If you wish to try out the latest unreleased version of Eastwood to see if it improves things for you, you can follow the steps here: |
Indeed:
|
ddossot: Thank you for verifying. I will close this issue, then, since your unwanted warnings have been addressed, as well as the original purpose for which I created the issue. |
Part of Eastwood release 0.2.1 |
Probably best done after/when implementing disabling warnings on a per-expression basis, issue #21 .
When doing so, verify whether it can be disabled for all expansions of a macro. Projects like Carmine and core.match have macros that frequently cause :constant-test and other warnings to be generated (see #108), hundreds of times each. I suspect a few well-placed disabling annotations in a few macro definitions could eliminate most of these. That would also be useful for some debug macros people have written in various projects that expand to things like (if debug-enabled (println "foo")) where debug-enabled is a ^:const Var.
The text was updated successfully, but these errors were encountered: