I've seen some projects that run checkstyle early in the build and causes the build to fail if there are violations.
That seems like a nice way to avoid piling up violations over time, and then spending time fixing them which is boring. I think we should do that. Thoughts? Gary On Fri, May 20, 2016 at 6:08 AM, <s...@apache.org> wrote: > Author: sebb > Date: Fri May 20 13:08:15 2016 > New Revision: 1744731 > > URL: http://svn.apache.org/viewvc?rev=1744731&view=rev > Log: > Allow checkstyle to be run standalone > > Modified: > commons/proper/codec/trunk/pom.xml > > Modified: commons/proper/codec/trunk/pom.xml > URL: > http://svn.apache.org/viewvc/commons/proper/codec/trunk/pom.xml?rev=1744731&r1=1744730&r2=1744731&view=diff > > ============================================================================== > --- commons/proper/codec/trunk/pom.xml (original) > +++ commons/proper/codec/trunk/pom.xml Fri May 20 13:08:15 2016 > @@ -235,6 +235,10 @@ limitations under the License. > > <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> > <commons.encoding>UTF-8</commons.encoding> > > > <checkstyle.header.file>${basedir}/LICENSE-header.txt</checkstyle.header.file> > + <!-- Use 2.9.1 instead of 2.10-2.15; which seems to scan the 'target' > + dir and wants license headers in .properties to be the header for > + Java files. --> > + <checkstyle.version>2.9.1</checkstyle.version> > </properties> > <build> > <pluginManagement> > @@ -368,6 +372,17 @@ limitations under the License. > <tarLongFileMode>gnu</tarLongFileMode> > </configuration> > </plugin> > + <!-- Allow use of mvn checkstyle:checkstyle. Must agree with > reporting section below. --> > + <plugin> > + <groupId>org.apache.maven.plugins</groupId> > + <artifactId>maven-checkstyle-plugin</artifactId> > + <version>${checkstyle.version}</version> > + <configuration> > + <configLocation>${basedir}/checkstyle.xml</configLocation> > + <enableRulesSummary>false</enableRulesSummary> > + <headerFile>${basedir}/LICENSE-header.txt</headerFile> > + </configuration> > + </plugin> > </plugins> > </build> > <reporting> > @@ -375,10 +390,7 @@ limitations under the License. > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-checkstyle-plugin</artifactId> > - <!-- Use 2.9.1 instead of 2.10-2.15; which seems to scan the > 'target' > - dir and wants license headers in .properties to be the header for > - Java files. --> > - <version>2.9.1</version> > + <version>${checkstyle.version}</version> > <configuration> > <configLocation>${basedir}/checkstyle.xml</configLocation> > <enableRulesSummary>false</enableRulesSummary> > > > -- E-Mail: garydgreg...@gmail.com | ggreg...@apache.org Java Persistence with Hibernate, Second Edition <http://www.manning.com/bauer3/> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/> Spring Batch in Action <http://www.manning.com/templier/> Blog: http://garygregory.wordpress.com Home: http://garygregory.com/ Tweet! http://twitter.com/GaryGregory