<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>
</plugin>
</plugins>
</build>
+
+ <properties>
+ <sonar.profile>violations-timemachine</sonar.profile>
+ <sonar.projectDate>2010-10-19</sonar.projectDate>
+ </properties>
</project>
</plugin>
</plugins>
</build>
+
+ <properties>
+ <sonar.profile>violations-timemachine</sonar.profile>
+ <sonar.projectDate>2010-11-13</sonar.projectDate>
+ </properties>
</project>
public class FileAddedInV2 {
- protected void methodOne() {
+ protected void methodOne() { // design for extension
int i = 0; // unused local variable
i++;
}
// 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++;
}
</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>
</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>
<tr>
<td>assertText</td>
<td>m_minor_violations</td>
- <td>0</td>
+ <td>3</td>
</tr>
<tr>
<td>assertText</td>
<tr>
<td>assertText</td>
<td>m_info_violations</td>
- <td>4</td>
+ <td>0</td>
</tr>
-
</tbody></table>
</body>
</html>