How can you suppress checkstyle checks within a block of code only for specific rules? [duplicate]
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: How to disable a particular checkstyle rule for a particular line of code? In turning off Checkstyle for a segment of code, is there a syntax that would suppress only specific checks. So rather than just // CHECKSTYLE:OFF code // CHECKSTYLE:ON you could have something like // CHECKSTYLE:OFF:RequireThis, code // CHECKSTYLE:ON In cases where we are purposely making an exception to the style, it would be nice to be