I have a situation where Checkstyle is producing false positives on the ParenPad rule check. I also saw this SO article Checkstyle: Usage of ParenPad Check and this question is unrelated.
Consider the following code segment:
public class Foo
public static final void main( String... args ) { ... }
}
When ParenPad is configured like so:
<module name="ParenPad">
<property name="option" value="space" />
</module>
This result will show as valid since there is a space before the opening (
in the main
method.
I was poking around in the ParenPad check class and I didn't see any other rules/configurations that could be used to enforce a single space before and/or after a parenthesis. Is there something built-in that allows me to enforce this requirement or do I need to create a custom check? From what I can tell, the current implementation checks for the existence for any number of spaces be it tab delimited or otherwise.