mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-10-26 08:42:29 +01:00 
			
		
		
		
	Add checkstyle to the build process and enable it for the Nicira NVP plugin
This commit is contained in:
		
							parent
							
								
									a196fbc836
								
							
						
					
					
						commit
						f39b6b2c56
					
				
							
								
								
									
										7
									
								
								parents/checkstyle/pom.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								parents/checkstyle/pom.xml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,7 @@ | ||||
| <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/maven-v4_0_0.xsd"> | ||||
|   <modelVersion>4.0.0</modelVersion> | ||||
|   <name>Apache CloudStack Checkstyle Configuration</name> | ||||
|   <groupId>org.apache.cloudstack</groupId> | ||||
|   <artifactId>checkstyle</artifactId> | ||||
|   <version>0.0.1-SNAPSHOT</version> | ||||
| </project> | ||||
							
								
								
									
										21
									
								
								parents/checkstyle/src/main/resources/tooling/checkstyle.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								parents/checkstyle/src/main/resources/tooling/checkstyle.xml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,21 @@ | ||||
| <?xml version="1.0"?> | ||||
| <!DOCTYPE module PUBLIC | ||||
|     "-//Puppy Crawl//DTD Check Configuration 1.2//EN" | ||||
|     "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"> | ||||
| 
 | ||||
| <module name="Checker"> | ||||
|     <module name="FileTabCharacter"> | ||||
|         <property name="eachLine" value="true"/> | ||||
|     </module> | ||||
| 
 | ||||
|     <module name="RegexpSingleline"> | ||||
|         <!-- \s matches whitespace character, $ matches end of line. --> | ||||
|         <property name="format" value="\s+$"/> | ||||
|         <property name="message" value="Line has trailing spaces."/> | ||||
|     </module> | ||||
|     <module name="TreeWalker"> | ||||
|        <module name="RedundantImport"/> | ||||
|        <module name="UnusedImports"/> | ||||
|     </module> | ||||
| 
 | ||||
| </module> | ||||
| @ -26,4 +26,39 @@ | ||||
|     <version>4.3.0-SNAPSHOT</version> | ||||
|     <relativePath>../../pom.xml</relativePath> | ||||
|   </parent> | ||||
| 
 | ||||
|   <build> | ||||
|     <plugins> | ||||
|       <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> | ||||
|     </plugins> | ||||
|   </build> | ||||
| 
 | ||||
| </project> | ||||
|  | ||||
							
								
								
									
										2
									
								
								pom.xml
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								pom.xml
									
									
									
									
									
								
							| @ -86,6 +86,7 @@ | ||||
|     <cs.target.dir>target</cs.target.dir> | ||||
|     <cs.daemon.version>1.0.10</cs.daemon.version> | ||||
|     <cs.jna.version>4.0.0</cs.jna.version> | ||||
|     <cs.checkstyle.version>2.10</cs.checkstyle.version> | ||||
|   </properties> | ||||
| 
 | ||||
|   <distributionManagement> | ||||
| @ -174,6 +175,7 @@ | ||||
|     <module>services</module> | ||||
|     <module>maven-standard</module> | ||||
|     <module>quickcloud</module> | ||||
|     <module>parents/checkstyle</module> | ||||
|   </modules> | ||||
| 
 | ||||
|   <dependencyManagement> | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user