Skip to content
This repository has been archived by the owner on Feb 10, 2022. It is now read-only.

Commit

Permalink
Adding custom checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
blundell committed Mar 17, 2013
1 parent 71cc7cd commit b083137
Show file tree
Hide file tree
Showing 11 changed files with 157 additions and 0 deletions.
Binary file not shown.
41 changes: 41 additions & 0 deletions releases/TestProject/TestProject/0.0.1/TestProject-0.0.1.pom
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,41 @@
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>TestProject</groupId>
<artifactId>TestProject</artifactId>
<version>0.0.1</version>

<properties>
<checkstyle.config.location>properties/checkstyle-configuration.xml</checkstyle.config.location>
</properties>

<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.9.1</version>
<dependencies>
<dependency>
<groupId>com.novoda</groupId>
<artifactId>novoda-checkstyle-checks</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>

</project>
4 changes: 4 additions & 0 deletions releases/TestProject/TestProject/0.0.1/_maven.repositories
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,4 @@
#NOTE: This is an internal implementation file, its format can be changed without prior notice.
#Sun Mar 17 15:04:14 GMT 2013
TestProject-0.0.1.jar>=
TestProject-0.0.1.pom>=
12 changes: 12 additions & 0 deletions releases/TestProject/TestProject/maven-metadata-local.xml
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>TestProject</groupId>
<artifactId>TestProject</artifactId>
<versioning>
<release>0.0.1</release>
<versions>
<version>0.0.1</version>
</versions>
<lastUpdated>20130317150414</lastUpdated>
</versioning>
</metadata>
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,4 @@
#NOTE: This is an internal implementation file, its format can be changed without prior notice.
#Sun Mar 17 14:59:42 GMT 2013
novoda-checkstyle-checks-1.0.pom>=
novoda-checkstyle-checks-1.0.jar>=
Binary file not shown.
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,47 @@
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.novoda</groupId>
<artifactId>novoda-checkstyle-checks</artifactId>
<name>Novoda Checkstyle Checks</name>
<version>1.0</version>

<parent>
<groupId>com.novoda</groupId>
<artifactId>novoda-checkstyle-parent</artifactId>
<version>1.0</version>
</parent>

<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>

This comment has been minimized.

Copy link
@ouchadam

ouchadam May 11, 2013

Contributor

This dependency adds a whooping 35,944+ methods to all of our projects!!!! When you consider android only has 65536 method references available, this is a serious issue! (unless you constantly proguard)

This comment has been minimized.

Copy link
@blundell

blundell May 11, 2013

Author Contributor

give it the scope of test. <scope>test</scope> test: This dependency is needed for compiling and running tests. It is not needed for compiling the main source or running the final artifact.

This comment has been minimized.

Copy link
@ouchadam

ouchadam May 11, 2013

Contributor

does it need to be released or can I just edit the file?

This comment has been minimized.

Copy link
@blundell

blundell May 11, 2013

Author Contributor

it would need to be released. You would add the scope here https://github.com/novoda/public-mvn-repo/blob/master/poms/reporting/pom.xml in the reporting pom?

This comment has been minimized.

Copy link
@ouchadam

ouchadam May 11, 2013

Contributor

this dependency isn't used in any tests though?

This comment has been minimized.

Copy link
@blundell

blundell May 11, 2013

Author Contributor

Unless you count the code reporting as part of the tests. I was reading scopes here: http://docs.codehaus.org/display/MAVENUSER/Dependency+Scopes , test seems the most appropriate, depends how it plays with Jenkins. The dependency is needed for checkstyle but not for the final runnable, checkstyle is ran as part of our testing phase. Testing code quality is part of tests.

This comment has been minimized.

Copy link
@ouchadam

ouchadam May 11, 2013

Contributor

I can't see why this dependency is brought in or how It's actually being used, I can see that the novoda checkstyle is used here.

This comment has been minimized.

This comment has been minimized.

Copy link
@ouchadam

ouchadam May 11, 2013

Contributor

yeah but what is using it and in which maven phase

This comment has been minimized.

Copy link
@blundell

blundell May 11, 2013

Author Contributor

the line you linked is using it https://github.com/novoda/public-mvn-repo/blob/master/poms/reporting/pom.xml#L98 . Although I am not sure if the line 30 declaration is needed. Then referenced like this: https://github.com/novoda/tesco/blob/develop/team-props/checkstyle.xml#L121

So it is just used by the plugin when the CI says run checkstyle (a maven profile I guess?)

This comment has been minimized.

Copy link
@ouchadam

ouchadam May 11, 2013

Contributor

if that's the case we should remove the main dependency for it and only have the plugin declare its need for it.

This comment has been minimized.

Copy link
@blundell

blundell May 11, 2013

Author Contributor

well yeah but you have to prove it :-)

<artifactId>checkstyle</artifactId>
<version>5.6</version>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
<include>**/*.java</include>
</includes>
<forkMode>always</forkMode>
</configuration>
</plugin>
</plugins>
</build>


</project>
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>com.novoda</groupId>
<artifactId>novoda-checkstyle-checks</artifactId>
<versioning>
<release>1.0</release>
<versions>
<version>1.0</version>
</versions>
<lastUpdated>20130317145942</lastUpdated>
</versioning>
</metadata>
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,3 @@
#NOTE: This is an internal implementation file, its format can be changed without prior notice.
#Wed Jan 02 12:32:28 GMT 2013
novoda-checkstyle-parent-1.0.pom>=
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,22 @@
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.novoda</groupId>
<artifactId>novoda-checkstyle-parent</artifactId>
<version>1.0</version>
<packaging>pom</packaging>

<parent>
<groupId>com.novoda</groupId>
<artifactId>team</artifactId>
<version>1.4</version>
</parent>

<modules>
<module>NovodaCheckstyle</module>
<module>TestProject</module>
</modules>

</project>
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>com.novoda</groupId>
<artifactId>novoda-checkstyle-parent</artifactId>
<versioning>
<release>1.0</release>
<versions>
<version>1.0</version>
</versions>
<lastUpdated>20130102123228</lastUpdated>
</versioning>
</metadata>

0 comments on commit b083137

Please sign in to comment.