I'm having troubles writing the right disable-warning
rule
I have something like
(is (thrown-with-msg? Exception #"Something"
(seq (lazy-function))))
which raises this kind of warning unused-ret-vals-in-try: Lazy function call return value is discarded inside body of try
I tried to use the :file
or the :symbol-matches
or a few other things but nothing seems to work
seq still doesn't realize the entire body
so the warning may be justified
well it doesn't matter, it just needs to evaluate "enough" to throw the exception
which it does
ok, I don't know enough about eastwood to help you, but if you write doall, does the warning go away? 🙂
no it doesn't
that's how it was originally
and well in theory I can disable linters, but I always struggle to get it right
uhm just adding a helper function that does the doall (lazy-function
works
seems a bit silly but ok as long as it works
what about dorun? doall still implies something should consume the result
while dorun means specifically that you want full evaluation and the values don't matter