This repository has been archived by the owner on Dec 10, 2024. It is now read-only.
Plugin produces 3 false positive for each test method in Spock Tests #21
Labels
bug
Something isn't working
note: this is a copy of an issue I've written at the old sonar groovy plugin. As it is stalled and my company migrated to this one, I just copied the text here. I guess the rule names are the same. If not, pls notice me so that I can update the description: pmayweg/sonar-groovy#89
We use the plugin mainly for our tests which are written in the awesome spock framework.
However, we noticed that at least three rules are applied to the test method name that don't make any sense in the context of a test method:
Here is some sample code that produces those issues
I resolve those issues as false positives and have to do it for every test method which is kinda annoying. On a side note, the
def setup()
anddef tearDown()
methods from Spock produce the NoDef-Rule violation as well, but they are much less annoying, as they are only rarely necessary (as opposed to a test class with usually 5-10 tests).def
and write a meaningful name (as GString) instead of a JUnit-style identifierThe text was updated successfully, but these errors were encountered: