You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by David Parry <da...@suranyami.com> on 2005/11/01 22:57:08 UTC
How to use CheckStyle plugin?
Can anyone suggest the canonical way to use the CheckStyle plugin?
Based on an example someone else supplied to me, I have done this:
...
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<executions>
<execution>
<id>check-main-src</id>
<phase>compile</phase>
<configuration>
<propertiesFile>checkstyle-src.xml</
propertiesFile>
<failsOnError>false</failsOnError>
</configuration>
<goals>
<goal>checkstyle</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
...
But I seem to be having some weirdness... this configuration seems to
ignore things I put in the checkstyle-src.xml file...
What's the best way to set this up?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How to use CheckStyle plugin?
Posted by Edwin Punzalan <ep...@exist.com>.
You have to wait for the patch to be applied though. The jira issue to
monitor is here: http://jira.codehaus.org/browse/MNG-1113
Edwin Punzalan wrote:
>
> Hi,
>
> There seems to be a confusion for the propertiesFile for m2 checkstyle
> plugin.
>
> propertiesFile in m2 checkstyle is the overriding properties sent to
> checkstyle report. From the name itself, it accepts formatting
> configurations in <key>=<value> format.
>
> If you're configuration is in XML format, it should be set as format.
> However, the format in m2 checkstyle only accepts three values: sun,
> avalon and turbine.
>
> Please file a jira feature request for this.
>
>
>
> David Parry wrote:
>
>> Can anyone suggest the canonical way to use the CheckStyle plugin?
>>
>> Based on an example someone else supplied to me, I have done this:
>>
>> ...
>> <build>
>> <plugins>
>> <plugin>
>> <groupId>org.apache.maven.plugins</groupId>
>> <artifactId>maven-checkstyle-plugin</artifactId>
>> <executions>
>> <execution>
>> <id>check-main-src</id>
>> <phase>compile</phase>
>> <configuration>
>> <propertiesFile>checkstyle-src.xml</
>> propertiesFile>
>> <failsOnError>false</failsOnError>
>> </configuration>
>> <goals>
>> <goal>checkstyle</goal>
>> </goals>
>> </execution>
>> </executions>
>> </plugin>
>> </plugins>
>> </build>
>> ...
>>
>> But I seem to be having some weirdness... this configuration seems
>> to ignore things I put in the checkstyle-src.xml file...
>>
>> What's the best way to set this up?
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How to use CheckStyle plugin?
Posted by Edwin Punzalan <ep...@exist.com>.
Hi,
There seems to be a confusion for the propertiesFile for m2 checkstyle
plugin.
propertiesFile in m2 checkstyle is the overriding properties sent to
checkstyle report. From the name itself, it accepts formatting
configurations in <key>=<value> format.
If you're configuration is in XML format, it should be set as format.
However, the format in m2 checkstyle only accepts three values: sun,
avalon and turbine.
Please file a jira feature request for this.
David Parry wrote:
> Can anyone suggest the canonical way to use the CheckStyle plugin?
>
> Based on an example someone else supplied to me, I have done this:
>
> ...
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-checkstyle-plugin</artifactId>
> <executions>
> <execution>
> <id>check-main-src</id>
> <phase>compile</phase>
> <configuration>
> <propertiesFile>checkstyle-src.xml</
> propertiesFile>
> <failsOnError>false</failsOnError>
> </configuration>
> <goals>
> <goal>checkstyle</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> </plugins>
> </build>
> ...
>
> But I seem to be having some weirdness... this configuration seems to
> ignore things I put in the checkstyle-src.xml file...
>
> What's the best way to set this up?
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org