]> source.dussan.org Git - sonarqube.git/commitdiff
Separate profile for violations-timemachine IT
authorGodin <mandrikov@gmail.com>
Mon, 13 Dec 2010 22:47:43 +0000 (22:47 +0000)
committerGodin <mandrikov@gmail.com>
Mon, 13 Dec 2010 22:47:43 +0000 (22:47 +0000)
tests/integration/tests/build.xml
tests/integration/tests/custom-projects/violations-timemachine/v1/pom.xml
tests/integration/tests/custom-projects/violations-timemachine/v2/pom.xml
tests/integration/tests/custom-projects/violations-timemachine/v2/src/main/java/org/sonar/tests/violationstimemachine/FileAddedInV2.java
tests/integration/tests/custom-projects/violations-timemachine/v2/src/main/java/org/sonar/tests/violationstimemachine/Hello.java
tests/integration/tests/src/it/integration-tests-backup.xml
tests/integration/tests/src/it/selenium/timemachine/violations-timemachine.html

index 9edf580f6c613e459fb0afa18d2fdb8d7a5253e9..75bad16d20f8ab51641fb78ed1b14f273d722247 100644 (file)
   <target name="violations-timemachine">
     <mvn args="clean install -DskiptTests" dir="${projects.dir}/violations-timemachine/v1"/>
     <mvnsonar failonerror="false"
-              args="-Dsonar.projectDate=2010-10-19"
               pom="${projects.dir}/violations-timemachine/v1/pom.xml"/>
 
     <mvn args="clean install -DskiptTests" dir="${projects.dir}/violations-timemachine/v2"/>
     <mvnsonar failonerror="false"
-              args="-Dsonar.projectDate=2010-11-13"
               pom="${projects.dir}/violations-timemachine/v2/pom.xml"/>
   </target>
 
index 6362642d2a1a554dd2ae55b0be8e3c7420553d55..3d8995b11f3e32a25a55826be0204157a0003eb3 100644 (file)
@@ -18,4 +18,9 @@
       </plugin>
     </plugins>
   </build>
+
+  <properties>
+    <sonar.profile>violations-timemachine</sonar.profile>
+    <sonar.projectDate>2010-10-19</sonar.projectDate>
+  </properties>
 </project>
index 6362642d2a1a554dd2ae55b0be8e3c7420553d55..d61f9471aae03d992e148416d9da61dddd2fe772 100644 (file)
@@ -18,4 +18,9 @@
       </plugin>
     </plugins>
   </build>
+
+  <properties>
+    <sonar.profile>violations-timemachine</sonar.profile>
+    <sonar.projectDate>2010-11-13</sonar.projectDate>
+  </properties>
 </project>
index 51636a431da4ed1e33bab6f5e63d0c959ffce3a0..0d6026331ab6c0a1ea1c2cd094d41a6a7be0a27d 100644 (file)
@@ -2,7 +2,7 @@ package org.sonar.tests.violationstimemachine;
 
 public class FileAddedInV2 {
 
-  protected void methodOne() {
+  protected void methodOne() { // design for extension
     int i = 0; // unused local variable
     i++;
   }
index 473f9b07773ae6f46f0d5d5ac606bb90f682f0b9..c3c8e1c8bcb7939c85d1c79233c00a8a67705600 100644 (file)
@@ -4,12 +4,12 @@ public class Hello {
 
   // We need two similar violations here to check that they would be associated correctly
 
-  protected void methodOne() {
+  protected void methodOne() { // design for extension
     int i = 0; // unused local variable
     i++;
   }
 
-  protected void methodTwo() {
+  protected void methodTwo() { // design for extension
     int i = 0; // unused local variable
     i++;
   }
index 6bfa7e97a41aadceef4b3b7cb073ec6fcbbb9451..075015591cd980552a787aea55a6c6a605140a42 100644 (file)
       </active-rules>
       <alerts/>
     </profile>
+    <profile>
+      <name><![CDATA[violations-timemachine]]></name>
+      <default-profile><![CDATA[false]]></default-profile>
+      <provided><![CDATA[false]]></provided>
+      <language><![CDATA[java]]></language>
+      <active-rules>
+        <active-rule>
+          <key><![CDATA[UnusedLocalVariable]]></key>
+          <plugin><![CDATA[pmd]]></plugin>
+          <level><![CDATA[MAJOR]]></level>
+        </active-rule>
+        <active-rule>
+          <key><![CDATA[com.puppycrawl.tools.checkstyle.checks.design.DesignForExtensionCheck]]></key>
+          <plugin><![CDATA[checkstyle]]></plugin>
+          <level><![CDATA[MINOR]]></level>
+        </active-rule>
+      </active-rules>
+    </profile>
   </profiles>
 </sonar-config>
index 332cadb01d54b17e762c58183bb9d97df180535d..ecf1c1362c3779f98a08380c07c045e60b53fddf 100644 (file)
 </tr>
 <tr>
        <td>assertTextPresent</td>
-       <td>profile Integration tests</td>
+       <td>Profile violations-timemachine</td>
        <td></td>
 </tr>
 <tr>
        <td>assertText</td>
        <td>m_violations</td>
-       <td>8</td>
+       <td>7</td>
 </tr>
 <tr>
        <td>assertText</td>
@@ -39,7 +39,7 @@
 <tr>
        <td>assertText</td>
        <td>m_minor_violations</td>
-       <td>0</td>
+       <td>3</td>
 </tr>
 <tr>
        <td>assertText</td>
@@ -49,9 +49,8 @@
 <tr>
        <td>assertText</td>
        <td>m_info_violations</td>
-       <td>4</td>
+       <td>0</td>
 </tr>
-
 </tbody></table>
 </body>
 </html>