JUnit rule set #4083
BraisGabin
started this conversation in
Show and tell
JUnit rule set
#4083
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Yesterday I was bited by this code:
It seems alright, but this test will not be run by JUnit. I don't mean that it will fail when it is runned. It will not be ran. The reason is because
foo
should return Unit to be run.And it was not just this test, there were a lot of test with this same issue so I decided to create a JUnit rule set for detekt to avoid this kind of mistakes. Right now it just have one rule (this one) but I'll add more as I found more patterns like this.
If you want to use it and give me feedback I'd be really happy!
https://github.com/BraisGabin/detekt-junit-rules
Beta Was this translation helpful? Give feedback.
All reactions