cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donal Lafferty <donal.laffe...@citrix.com>
Subject RE: checkstyle
Date Mon, 04 Nov 2013 17:05:10 GMT
I'm not a committer, so it was easiest to post a rules file on the cwiki

There's a link from the blog post http://dlafferty.blogspot.co.uk/2013/07/apache-cloudstack-java-coding.html
 

Direct link: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Developer+Tools

;)

DL

> -----Original Message-----
> From: Trippie [mailto:trippie@gmail.com] On Behalf Of Hugo Trippaers
> Sent: 04 November 2013 16:54
> To: dev@cloudstack.apache.org
> Subject: Re: checkstyle
> 
> The search-fu is weak in this one..
> 
> Did you ever get to commit that file Donal? I'd be very much interested :-)
> 
> Cheers,
> 
> Hugo
> 
> On 4 nov. 2013, at 17:48, Donal Lafferty <donal.lafferty@citrix.com> wrote:
> 
> > How does it compare to previous versions for CloudStack?  E.g.
> > http://markmail.org/message/yz6qa2v47cdeic4d
> >
> >
> >> -----Original Message-----
> >> From: Trippie [mailto:trippie@gmail.com] On Behalf Of Hugo Trippaers
> >> Sent: 04 November 2013 14:30
> >> To: dev@cloudstack.apache.org
> >> Subject: checkstyle
> >>
> >> Hey,
> >>
> >> Just added a very basic checkstyle configuration to maven. The
> >> configuration file is in parents/checkstyle and it checks just a few
> >> very basic things, like trailing whitespace and tabs where there should be
> spaces.
> >>
> >> I've enabled it for a single plugin to just the impact on build time
> >> and the amount of generated errors. Quite considerable, but i hope
> >> other parts of the code are better ;-)
> >>
> >> You can enable check style for your plugin by adding the following to
> >> your build plugins config in maven:
> >>
> >>      <plugin>
> >>        <groupId>org.apache.maven.plugins</groupId>
> >>        <artifactId>maven-checkstyle-plugin</artifactId>
> >>        <version>${cs.checkstyle.version}</version>
> >>        <dependencies>
> >>          <dependency>
> >>            <groupId>org.apache.cloudstack</groupId>
> >>            <artifactId>checkstyle</artifactId>
> >>            <version>0.0.1-SNAPSHOT</version>
> >>          </dependency>
> >>        </dependencies>
> >>        <executions>
> >>          <execution>
> >>            <phase>process-sources</phase>
> >>            <goals>
> >>              <goal>check</goal>
> >>            </goals>
> >>          </execution>
> >>        </executions>
> >>        <configuration>
> >>          <failsOnError>true</failsOnError>
> >>          <configLocation>tooling/checkstyle.xml</configLocation>
> >>          <consoleOutput>true</consoleOutput>
> >>          <includeTestSourceDirectory>true</includeTestSourceDirectory>
> >>          <sourceDirectory>${project.basedir}</sourceDirectory>
> >>
> >> <includes>**\/*.java,**\/*.xml,**\/*.ini,**\/*.sh,**\/*.bat</includes>
> >>          <excludes>**\/target\/,**\/bin\/</excludes>
> >>        </configuration>
> >>      </plugin>
> >>
> >>
> >> For now its voluntary, but i would like your opinion on making this a
> >> mandatory part of the build process. Meaning a compile with not
> >> succeed when check style reports errors.
> >>
> >> Cheers,
> >>
> >> Hugo


Mime
View raw message