[
https://issues.apache.org/jira/browse/NIFI-10540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17611062#comment-17611062
]
Daniel Stieglitz edited comment on NIFI-10540 at 9/29/22 2:33 PM:
------------------------------------------------------------------
There are some differences between the rules found in the main
[pom.xml|https://github.com/apache/nifi/blob/main/pom.xml#L924] and the rules
found in the
[gist|[https://gist.github.com/alopresto/67f43552c225468b92fcc9239072d737]]
.When I tried to use the gist as the file to configure the Maven Checkstyle
plugin with, the build failed. These are the differences I noted:
1. The following rules are commented out in the gist and not in the main pom.xml
{code:java}
<module name="RightCurly" />
<module name="RightCurly">
<property name="option" value="alone" />
<property name="tokens" value="CLASS_DEF, METHOD_DEF, CTOR_DEF,
LITERAL_FOR, LITERAL_WHILE, LITERAL_DO, STATIC_INIT, INSTANCE_INIT"
/></module>{code}
2. For rule <module name="JavadocMethod">
gist has
{code:java}
<module name="JavadocMethod">
<property name="allowMissingJavadoc" value="true" />
<property name="allowMissingParamTags" value="true" />
<property name="allowMissingThrowsTags" value="true" />
<property name="allowMissingReturnTag" value="true" />
<property name="allowedAnnotations"
value="Override,Test,BeforeClass,AfterClass,Before,After" />
<property name="allowThrowsTagsForSubclasses" value="true" />
</module>{code}
pom.xml has
{code:java}
<module name="JavadocMethod">
<property name="allowMissingParamTags" value="true" />
<property name="allowMissingReturnTag" value="true" />
<property name="allowedAnnotations"
value="Override,Test,BeforeClass,AfterClass,Before,After" /></module>{code}
3. In the gist <module name="LineLength"> is a child of rule <module
name="TreeWalker"> while in the main pom it is a sibling.
was (Author: JIRAUSER294662):
There are some differences between the rules found in the main
[pom.xml|https://github.com/apache/nifi/blob/main/pom.xml#L924] and the rules
found in the
[gist|[https://gist.github.com/alopresto/67f43552c225468b92fcc9239072d737]]
.When I tried to use the gist as the file to configure the Maven Checkstyle
plugin with, the build failed. These are the differences I noted:
# The following rules are commented out in the gist and not in the main pom.xml
**
{code:java}
<module name="RightCurly" />
<module name="RightCurly">
<property name="option" value="alone" />
<property name="tokens" value="CLASS_DEF, METHOD_DEF, CTOR_DEF,
LITERAL_FOR, LITERAL_WHILE, LITERAL_DO, STATIC_INIT, INSTANCE_INIT" />
</module>{code}
# For rule <module name="JavadocMethod">
** gist has
{code:java}
<module name="JavadocMethod">
<property name="allowMissingJavadoc" value="true" />
<property name="allowMissingParamTags" value="true" />
<property name="allowMissingThrowsTags" value="true" />
<property name="allowMissingReturnTag" value="true" />
<property name="allowedAnnotations"
value="Override,Test,BeforeClass,AfterClass,Before,After" />
<property name="allowThrowsTagsForSubclasses" value="true" />
</module>{code}
*
** pom.xml has
{code:java}
<module name="JavadocMethod">
<property name="allowMissingParamTags" value="true" />
<property name="allowMissingReturnTag" value="true" />
<property name="allowedAnnotations"
value="Override,Test,BeforeClass,AfterClass,Before,After" /></module>{code}
# In the gist <module name="LineLength"> is a child of rule <module
name="TreeWalker"> while in the main pom it is a sibling.
> Use single Checkstyle configuration file to configure Maven and Intellij
> Checkstyle plugins
> -------------------------------------------------------------------------------------------
>
> Key: NIFI-10540
> URL: https://issues.apache.org/jira/browse/NIFI-10540
> Project: Apache NiFi
> Issue Type: Improvement
> Reporter: Daniel Stieglitz
> Assignee: Daniel Stieglitz
> Priority: Trivial
>
> In the [Contributor
> Guide|https://cwiki.apache.org/confluence/display/NIFI/Contributor+Guide#ContributorGuide-IntelliJIDEAUsers]
> it is suggested to use a Checkstyle configuration file extracted from the
> top level pom when using the Intellij Checkstyle plugin. In order to avoid
> possible inconsistencies between what is in that configuration file and what
> is in the top level pom.xml, place a Checkstyle configuration file as part of
> the NIFI code base and reference it in the plugin configuration as detailed
> in [Using a Custom Checkstyle Checker
> Configuration|https://maven.apache.org/plugins/maven-checkstyle-plugin/examples/custom-checker-config.html]
> and use the same file for configuring the Intellij Checkstyle plugin
--
This message was sent by Atlassian Jira
(v8.20.10#820010)