commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: svn commit: r1744731 - /commons/proper/codec/trunk/pom.xml
Date Fri, 20 May 2016 17:37:51 GMT
On 20 May 2016 at 18:26, Gary Gregory <garydgregory@gmail.com> wrote:
> On Fri, May 20, 2016 at 10:22 AM, sebb <sebbaz@gmail.com> wrote:
>
>> On 20 May 2016 at 18:09, Gary Gregory <garydgregory@gmail.com> wrote:
>> > 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?
>>
>> It's can increase the build time when doing iterative testing, so I
>> don't think it should be compulsory.
>>
>
> How much time does it add? 1 second? I usually run tests from Eclipse as I
> develop, and from the Maven CLI before I commit.

It's not all that long, but it's still a pain to have to fix all the
checkstyle issues as they are created.

Besides, it won't help if the dev does not run Maven before committing.
For some simple changes it's tempting not to bother runninng all the tests.

Whereas adding it to the CI build catches such omissions.

> Gary
>
>
>>
>> One way to get the feedback is to add the check to the CI builds.
>>
>> That has the advantage of reporting even if the committer has not run
>> the Maven build recently.
>>
>> > Gary
>> >
>> > On Fri, May 20, 2016 at 6:08 AM, <sebb@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: garydgregory@gmail.com | ggregory@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
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message