0

In an Android-project I'm trying to integrate checkstyle. As I'm using AndroidAnnotations, a few methods have to be declared like this:

@Click(R.id.togglePlay)
protected final void doPauseResume() {
}

They need to be protected in order for the generated class to be able to call them. How could I teach checkstyle disable a few warnings, based on the @Click annotation, (or more broadly, based on a annotation in the org.androidannotations.annotations package)?

The class has other protected methods, which I want to keep being checked, of course.

Do I need to implement a Filter?

Sebastian Roth
  • 11,344
  • 14
  • 61
  • 110
  • I am wondering, what check do you use for this? `VisibilityModifier` is only for fields, i think. – WonderCsabo Jun 08 '15 at 19:06
  • @WonderCsabo don't know yet, but I'm tempted to write a Filter and let it remove the `AuditEvent`s that are relevant to AA. – Sebastian Roth Jun 09 '15 at 01:59
  • VisibilityModifier has ignoreAnnotationCanonicalNames parameter which can be used for this purpose without a Filter. – WonderCsabo Jun 09 '15 at 08:35
  • Possible duplicate of [How to Ignore checkstyle javadoc warning for a method with a specific annotation?](http://stackoverflow.com/q/26120003/1005481) – barfuin Jun 09 '15 at 11:48

0 Answers0