wu-sheng closed pull request #925: Feature/Style Check
URL: https://github.com/apache/incubator-skywalking/pull/925
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/apm-checkstyle/pom.xml b/apm-checkstyle/pom.xml
new file mode 100644
index 000000000..7b728b5cc
--- /dev/null
+++ b/apm-checkstyle/pom.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  ~
+  -->
+
+<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";>
+    <parent>
+        <groupId>org.apache</groupId>
+        <artifactId>apache</artifactId>
+        <version>19</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>org.apache.skywalking</groupId>
+    <artifactId>apm-checkstyle</artifactId>
+    <version>5.0.0-alpha-SNAPSHOT</version>
+    <description>Module to hold Checkstyle for SkyWalking.</description>
+
+    <build>
+        <plugins>
+            <!-- ??? -->
+            <plugin>
+                <groupId>org.jacoco</groupId>
+                <artifactId>jacoco-maven-plugin</artifactId>
+                <version>0.7.9</version>
+                <executions>
+                    <execution>
+                        <id>prepare-agent</id>
+                        <goals>
+                            <goal>prepare-agent</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.eluder.coveralls</groupId>
+                <artifactId>coveralls-maven-plugin</artifactId>
+                <version>4.1.0</version>
+                <configuration>
+                    <repoToken>xFwR2GqmxcMxV7tGEpW2NfwIrbCD4cQCS</repoToken>
+                    <sourceDirectories>
+                        
<sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+                    </sourceDirectories>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>
\ No newline at end of file
diff --git a/CHECKSTYLE_HEAD 
b/apm-checkstyle/src/main/resources/skywalking/CHECKSTYLE_HEAD
similarity index 100%
rename from CHECKSTYLE_HEAD
rename to apm-checkstyle/src/main/resources/skywalking/CHECKSTYLE_HEAD
diff --git a/checkStyle.xml 
b/apm-checkstyle/src/main/resources/skywalking/checkStyle.xml
similarity index 97%
rename from checkStyle.xml
rename to apm-checkstyle/src/main/resources/skywalking/checkStyle.xml
index b90ee7c02..913484e56 100644
--- a/checkStyle.xml
+++ b/apm-checkstyle/src/main/resources/skywalking/checkStyle.xml
@@ -28,11 +28,6 @@
     <!--To configure the check to report on the first instance in each file-->
     <module name="FileTabCharacter"/>
 
-    <!-- header -->
-    <module name="Header">
-        <property name="headerFile" value="CHECKSTYLE_HEAD"/>
-    </module>
-
     <module name="RegexpSingleline">
         <property name="format" value="System\.out\.println"/>
         <property name="message" value="Prohibit invoking System.out.println 
in source code !"/>
diff --git a/pom.xml b/pom.xml
index 7eacc5984..3a4eb43a5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -65,23 +65,54 @@
         <module>apm-protocol</module>
         <module>apm-webapp</module>
         <module>apm-dist</module>
+        <module>apm-checkstyle</module>
     </modules>
     <packaging>pom</packaging>
 
     <name>apm</name>
     <url>https://github.com/apache/incubator-skywalking</url>
 
+    <scm>
+        <url>https://github.com/apache/incubator-skywalking</url>
+        
<connection>scm:git:https://github.com/apache/incubator-skywalking.git</connection>
+        
<developerConnection>scm:git:https://github.com/apache/incubator-skywalking.git</developerConnection>
+        <tag>HEAD</tag>
+    </scm>
+
     <issueManagement>
         <system>GitHub</system>
         <url>https://github.com/apache/incubator-skywalking/issues</url>
     </issueManagement>
 
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+        </license>
+    </licenses>
+
+    <mailingLists>
+        <mailingList>
+            <name>SkyWalking Developer List</name>
+            <post>d...@skywalking.incubator.apache.org</post>
+            
<subscribe>dev-subscr...@skywalking.incubator.apache.org</subscribe>
+            
<unsubscribe>dev-unsubscr...@skywalking.incubator.apache.org</unsubscribe>
+        </mailingList>
+        <mailingList>
+            <name>SkyWalking Commits</name>
+            <post>comm...@skywalking.incubator.apache.org</post>
+            
<subscribe>commits-subscr...@skywalking.incubator.apache.org</subscribe>
+            
<unsubscribe>commits-unsubscr...@skywalking.incubator.apache.org</unsubscribe>
+        </mailingList>
+    </mailingLists>
+
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <compiler.version>1.8</compiler.version>
         <scala.compiler.version>2.11.7</scala.compiler.version>
         <powermock.version>1.6.4</powermock.version>
         <docker.plugin.version>0.4.13</docker.plugin.version>
+        <checkstyle.version>6.18</checkstyle.version>
     </properties>
 
     <dependencies>
@@ -255,12 +286,20 @@
             <plugin>
                 <artifactId>maven-checkstyle-plugin</artifactId>
                 <version>2.17</version>
+                <dependencies>
+                    <dependency>
+                        <groupId>org.apache.skywalking</groupId>
+                        <artifactId>apm-checkstyle</artifactId>
+                        <version>${project.version}</version>
+                    </dependency>
+                </dependencies>
                 <executions>
                     <execution>
                         <id>validate</id>
                         <phase>validate</phase>
                         <configuration>
-                            <configLocation>checkStyle.xml</configLocation>
+                            
<configLocation>skywalking/checkStyle.xml</configLocation>
+                            
<headerLocation>skywalking/CHECKSTYLE_HEAD</headerLocation>
                             <encoding>UTF-8</encoding>
                             <consoleOutput>true</consoleOutput>
                             
<includeTestSourceDirectory>true</includeTestSourceDirectory>
@@ -372,5 +411,5 @@
             </build>
         </profile>
     </profiles>
-    
+
 </project>


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to