Checkstyle configuration clean-up, removing what is now in odlparent 15/48215/1
authorMichael Vorburger <vorburger@redhat.com>
Thu, 10 Nov 2016 14:39:15 +0000 (15:39 +0100)
committerMichael Vorburger <vorburger@redhat.com>
Thu, 10 Nov 2016 14:39:15 +0000 (15:39 +0100)
This is more consistent with how other projects do it now, and more
importantly makes Checkstlye work under Eclipse for AAA (kinda, see
below), to correctly ignore generated code (which without this change it
doesn't, and you get lots of red).  It also helps avoid a major
confusion at least I just had when debugging this problem.. ;-)

It's actually not EXACTLY the same configuration as the one in
odlparent; in aaa someone had come up with a "trick" using
<sourceDirectory>${project.basedir}, presumable to scan not just src/**
but even root and other directories; this technically looses that, but I
think in the short term for consistency that's better.  In the medium
term, maybe I'll try to see if that approach could be generally applied
to odlparent.

This change does not touch AAA's use of yangtools' checkstyle-logging,
which is currently discouraged because it breaks Eclipse; more about
that perhaps in a separate future Gerrit.

Change-Id: I94acce1111004a287c1566f058fa1a010829266f
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
parent/pom.xml

index 8e3fc91826408e8dfc8eab52414ccce8fa8b6845..235d308863abc6821aeab8147ef507f47c403f70 100644 (file)
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-checkstyle-plugin</artifactId>
                 <configuration>
-                    <!-- checkstyle is evil -->
-                    <skip>false</skip>
-                    <failOnViolation>true</failOnViolation>
+                    <propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
+
                     <configLocation>checkstyle-logging.xml</configLocation>
-                    <consoleOutput>true</consoleOutput>
-                    <includeTestSourceDirectory>true</includeTestSourceDirectory>
-                    <sourceDirectory>${project.basedir}</sourceDirectory>
-                    <includes>**\/*.java,**\/*.xml,**\/*.ini,**\/*.sh,**\/*.bat,**\/*.yang</includes>
-                    <excludes>**\/target\/,**\/bin\/,**\/target-ide\/,**\/src/main/yang-gen-config\/,**\/src/main/yang-gen-sal\/</excludes>
                 </configuration>
                 <executions>
                     <execution>