New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Check: ForbidParameterInAnnotation #108

Closed
romani opened this Issue Apr 6, 2013 · 5 comments

Comments

Projects
None yet
5 participants
@romani
Member

romani commented Apr 6, 2013

Use case:
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.
Options:
"annotationName" is simple String
"parameterName" is simple String
"parameterValue" is regexp String, default value is ".*"

@ghost ghost assigned arsen1992 May 8, 2013

@daniilyar daniilyar changed the title from New Check: ForbidParameterInAnnatation to New Check: ForbidParameterInAnnotation Apr 19, 2014

@daniilyar daniilyar assigned ghost Apr 19, 2014

@daniilyar daniilyar added easy and removed enhancement labels Aug 15, 2014

@romani

This comment has been minimized.

Show comment
Hide comment
Member

romani commented Apr 18, 2015

@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani Nov 19, 2016

Member

fix is merged.

Member

romani commented Nov 19, 2016

fix is merged.

@romani romani closed this Nov 19, 2016

@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani Nov 20, 2016

Member

@rnveach , issue to use new Check - checkstyle/checkstyle#3567

Member

romani commented Nov 20, 2016

@rnveach , issue to use new Check - checkstyle/checkstyle#3567

@rnveach

This comment has been minimized.

Show comment
Hide comment
@rnveach

rnveach Nov 21, 2016

Contributor

Update is in PR #487

Contributor

rnveach commented Nov 21, 2016

Update is in PR #487

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment