jonase / eastwood

Clojure lint tool
1.09k stars 66 forks source link

Strengthen `suspicious-is-forms` #362

Closed vemv closed 3 years ago

vemv commented 3 years ago

Fixes https://github.com/jonase/eastwood/issues/298 Closes https://github.com/jonase/eastwood/issues/306

Sadly, while I could reproduce the bug when checking cider-nrepl as a whole, I couldn't when extracting only the cider.nrepl.middleware.stacktrace-spec-test ns.

So I'm not sure we should bother growing the test suite.

I did add some strategic asserts, which of course are, in a way, 'inline tests' preventing a regression.

How to QA

Verify the bug can be reproduced

rm -rf ~/.m2/repository/jonase/
cd
git clone https://github.com/clojure-emacs/cider-nrepl xxx
cd xxx
git checkout b2c0b920d762fdac2f8210805df2055af63f2eb1
# erase cache:
# rm -rf .eastwood
lein with-profile +1.9 eastwood '{:exclude-namespaces [cider-nrepl.plugin cider.nrepl.test-session]}'
# ^ should complain about `:invoke`

Install Eastwood @ master and verify it's gone

cd <your Eastwood clone>
lein with-profile +eastwood-plugin install
# go to the cider-nrepl clone, make sure to bump the Eastwood plugin within its project.clj
# erase cache:
# rm -rf .eastwood
lein with-profile +1.9 eastwood '{:exclude-namespaces [cider-nrepl.plugin cider.nrepl.test-session]}'
# ^ should not complain about `:invoke`!