You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by am...@apache.org on 2021/08/13 10:21:31 UTC

[ignite-3] branch main updated: IGNITE-15182 Fix PMD plugin configuration (#241)

This is an automated email from the ASF dual-hosted git repository.

amashenkov pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


The following commit(s) were added to refs/heads/main by this push:
     new cb77daa  IGNITE-15182 Fix PMD plugin configuration (#241)
cb77daa is described below

commit cb77daaf551e8eee108f01af62fbcb58bb0a7b85
Author: Semyon Danilov <sa...@yandex.ru>
AuthorDate: Fri Aug 13 13:21:25 2021 +0300

    IGNITE-15182 Fix PMD plugin configuration (#241)
---
 parent/pom.xml | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/parent/pom.xml b/parent/pom.xml
index 01fae41..a086749 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -783,6 +783,53 @@
                 </plugins>
             </build>
         </profile>
+
+        <!--
+            Profile to add generated sources to the list of paths for the PMD plugin.
+        -->
+        <profile>
+            <activation>
+                <property>
+                    <name>pmd.check-generated-sources</name>
+                </property>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>build-helper-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>add-generated-source-for-pmd</id>
+                                <phase>validate</phase>
+                                <goals>
+                                    <goal>add-source</goal>
+                                </goals>
+                                <configuration>
+                                    <sources>
+                                        <source>target/generated-sources/annotations</source>
+                                        <source>target/generated-sources/javacc</source>
+                                        <source>target/generated-sources/fmpp</source>
+                                    </sources>
+                                </configuration>
+                            </execution>
+                            <execution>
+                                <id>add-generated-test-source-for-pmd</id>
+                                <phase>validate</phase>
+                                <goals>
+                                    <goal>add-test-source</goal>
+                                </goals>
+                                <configuration>
+                                    <sources>
+                                        <source>target/generated-test-sources/test-annotations</source>
+                                    </sources>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
     </profiles>
 
     <build>
@@ -1113,6 +1160,11 @@
                     <rulesets>
                         <ruleset>${project.basedir}/check-rules/pmd-rules.xml</ruleset>
                     </rulesets>
+                    <printFailingErrors>true</printFailingErrors>
+                    <excludes>
+                        <exclude>**/org/apache/ignite/internal/generated/query/calcite/sql/IgniteSqlParserImplTokenManager.java</exclude>
+                        <exclude>**/org/apache/ignite/internal/generated/query/calcite/sql/IgniteSqlParserImpl.java</exclude>
+                    </excludes>
                 </configuration>
             </plugin>