Java Checkstyle-我可以更改';(';是否应位于前一行?`方法规则?

Java Checkstyle-我可以更改';(';是否应位于前一行?`方法规则?,java,checkstyle,Java,Checkstyle,在checkstyle中,MethodParamPad生成消息- “(”应在前一行上 例如,在我的代码中,它不喜欢 schema.withProperty(propertyName, createStringType(propertyAnnotation, annotations.getAnnotationByClass (StringSchema.class))); 它希望: schema.withProperty(propertyName, crea

在checkstyle中,
MethodParamPad
生成消息-

“(”应在前一行上

例如,在我的代码中,它不喜欢

    schema.withProperty(propertyName, createStringType(propertyAnnotation, annotations.getAnnotationByClass
            (StringSchema.class)));
它希望:

    schema.withProperty(propertyName, createStringType(propertyAnnotation, annotations.getAnnotationByClass(
            StringSchema.class)));
这是到目前为止我的checkstyle.xml文件


我怎样才能使它强制执行第一个代码段,而不是第二个?

我认为您不能真正强制执行第二个样式,因为它在调用
schema.getProperty时会失败

但是,该规则有一个
allowLineBreaks
参数,您可以将该参数设置为true以使代码通过。 看



不管它值多少钱,我认为它告诉您使用的比您想要使用的要好。好的。我已经添加了这一点,实际上我再也看不到警告了。这很好。
<module name="MethodParamPad">
    <property name="allowLineBreaks" value="true" />
</module>