I want to write a custom check for checkstyle.
my rul开发者_JAVA百科e that i want to work with is Class should define a constructor- but Suppress this rule for inner classes
how should i go about writing this check.
You can create a custom CheckStyle check by extending the com.puppycrawl.tools.checkstyle.api.Check
class, you then create a jar for this project and point CheckStyle to use it. I've written an example here:
http://blog.blundellapps.co.uk/create-your-own-checkstyle-check/
and source code here:
https://github.com/blundell/CreateYourOwnCheckStyleCheck
精彩评论