From: simonbrandhof Date: Wed, 22 Sep 2010 13:14:08 +0000 (+0000) Subject: SONAR-1798 Ability to register a number of points to a rule violation X-Git-Tag: 2.6~983 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d6000bfbea0cf09b47bcfe330b9675fc9a3094bb;p=sonarqube.git SONAR-1798 Ability to register a number of points to a rule violation --- diff --git a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/purges/PurgeDeletedResourcesTest/purgeDeletedResources-result.xml b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/purges/PurgeDeletedResourcesTest/purgeDeletedResources-result.xml index acb67c7fca2..20a21ee945e 100644 --- a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/purges/PurgeDeletedResourcesTest/purgeDeletedResources-result.xml +++ b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/purges/PurgeDeletedResourcesTest/purgeDeletedResources-result.xml @@ -26,10 +26,10 @@ - - - - + + + + - - - - + + + + --> - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + org.apache.maven.plugins maven-compiler-plugin - 2.3.1 + 2.3.2 org.apache.maven.plugins @@ -120,7 +120,7 @@ org.apache.maven.plugins maven-deploy-plugin - 2.4 + 2.5 org.apache.maven.plugins @@ -145,12 +145,12 @@ org.apache.maven.plugins maven-javadoc-plugin - 2.5 + 2.7 org.apache.maven.plugins maven-jxr-plugin - 2.1 + 2.2 org.apache.maven.plugins @@ -175,7 +175,7 @@ org.apache.maven.plugins maven-source-plugin - 2.1.1 + 2.1.2 org.apache.maven.plugins @@ -481,7 +481,7 @@ mmmm com.google.gwt gwt-user - 2.0.3 + 2.0.4 com.google.gwt diff --git a/sonar-batch/src/main/java/org/sonar/batch/ViolationsDao.java b/sonar-batch/src/main/java/org/sonar/batch/ViolationsDao.java index bdca03188ca..4ff285fdd60 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/ViolationsDao.java +++ b/sonar-batch/src/main/java/org/sonar/batch/ViolationsDao.java @@ -56,6 +56,7 @@ public class ViolationsDao { violation.setLineId(model.getLine()); violation.setMessage(model.getMessage()); violation.setPriority(model.getPriority()); + violation.setPoints(model.getPoints()); violations.add(violation); } return violations; @@ -89,7 +90,9 @@ public class ViolationsDao { violation.setPriority(activeRule.getPriority()); model.setLine(violation.getLineId()); model.setMessage(violation.getMessage()); + model.setPoints(violation.getPoints()); model.setSnapshotId(snapshot.getId()); + return model; } diff --git a/sonar-batch/src/test/resources/org/sonar/batch/FinalizeSnapshotsJobTest/lastSnapshotIsNotUpdatedWhenAnalyzingPastSnapshot-result.xml b/sonar-batch/src/test/resources/org/sonar/batch/FinalizeSnapshotsJobTest/lastSnapshotIsNotUpdatedWhenAnalyzingPastSnapshot-result.xml index 1bab0601797..4179864dc7c 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/FinalizeSnapshotsJobTest/lastSnapshotIsNotUpdatedWhenAnalyzingPastSnapshot-result.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/FinalizeSnapshotsJobTest/lastSnapshotIsNotUpdatedWhenAnalyzingPastSnapshot-result.xml @@ -57,13 +57,13 @@ - - - - + + + + - - + + - - - - + + + + - - + + --> - - - - + + + + - - - - + + + + true, :precision => 30, :scale => 20 + end + +end