usage of "expected" parameter in annotation Test (http://junit.sourceforge.net/javadoc/org/junit/Test.html ) is not convenient for UnitTesting as it prints exceptions in logs so it will be distracting during UTs failures examination in Jenkins or during maven build. It is hard to distinguish expected Exception and unexpected Exception that appear in test but due to lack of appropriate check does not fails.
Rule of thumb: no exceptions means all is ok, exception appear - it is a problem.
So we need to create Check that will allow us to detect parameter usage in in required Annotation.
"annotationName" is simple String
"parameterName" is simple String
"parameterValue" is regexp String, default value is ".*"
Sergey does not have time to finish , but 90% of work is done:
non finished discussion:
Issue #108: added ForbidAnnotationElementValueCheck
fix is merged.
@rnveach , issue to use new Check - checkstyle/checkstyle#3567
@rnveach , we missed update at https://github.com/sevntu-checkstyle/sevntu.checkstyle/blob/master/sevntu-checkstyle-sonar-plugin/src/main/resources/com/github/sevntu/checkstyle/sonar/checkstyle-extensions.xml
Update is in PR #487