aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGodin <mandrikov@gmail.com>2010-11-29 15:58:35 +0000
committerGodin <mandrikov@gmail.com>2010-11-29 15:58:35 +0000
commit3d5765bd4b52b9a5cf1f4f244823c0b307b0dade (patch)
tree1b806b9a144d0ee2a3229843ce024b25fe42eb74
parentf8ab1ee2e5a459e37da0f2f811b4cd920f124b23 (diff)
downloadsonarqube-3d5765bd4b52b9a5cf1f4f244823c0b307b0dade.tar.gz
sonarqube-3d5765bd4b52b9a5cf1f4f244823c0b307b0dade.zip
Instead of 'force' use more meaningful name 'bypassExclusionMechanism' in CheckMessage
-rw-r--r--plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/check/NoSonarCheck.java2
-rw-r--r--plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/ChecksBridge.java2
-rw-r--r--sonar-squid/src/main/java/org/sonar/squid/api/CheckMessage.java10
3 files changed, 7 insertions, 7 deletions
diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/check/NoSonarCheck.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/check/NoSonarCheck.java
index e17c348d012..7dcb0929587 100644
--- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/check/NoSonarCheck.java
+++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/check/NoSonarCheck.java
@@ -35,7 +35,7 @@ public class NoSonarCheck extends SquidCheck {
public void visitFile(SourceFile sourceFile) {
for (Integer line : sourceFile.getNoSonarTagLines()) {
CheckMessage message = new CheckMessage(this, "Is //NOSONAR used to exclude false-positive or to hide real quality flaw ?");
- message.setForced(true);
+ message.setBypassExclusionMechanism(true);
message.setLine(line);
sourceFile.log(message);
}
diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/ChecksBridge.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/ChecksBridge.java
index 9caf6f482c2..16fbeb8fde5 100644
--- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/ChecksBridge.java
+++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/ChecksBridge.java
@@ -44,7 +44,7 @@ public class ChecksBridge extends Bridge {
violation.setLineId(checkMessage.getLine());
violation.setMessage(checkMessage.getText(Locale.ENGLISH));
violation.setCost(checkMessage.getCost());
- context.saveViolation(violation, checkMessage.isForced());
+ context.saveViolation(violation, checkMessage.isBypassExclusionMechanism());
}
}
}
diff --git a/sonar-squid/src/main/java/org/sonar/squid/api/CheckMessage.java b/sonar-squid/src/main/java/org/sonar/squid/api/CheckMessage.java
index 1c56f8a4fb9..4fa3952c348 100644
--- a/sonar-squid/src/main/java/org/sonar/squid/api/CheckMessage.java
+++ b/sonar-squid/src/main/java/org/sonar/squid/api/CheckMessage.java
@@ -33,7 +33,7 @@ public class CheckMessage implements Message {
private CodeCheck codeCheck;
private String defaultMessage;
private Object[] messageArguments;
- private Boolean forced;
+ private Boolean bypassExclusionMechanism;
public CheckMessage(CodeCheck rule, String message, Object... messageArguments) {
this.codeCheck = rule;
@@ -65,12 +65,12 @@ public class CheckMessage implements Message {
return cost;
}
- public void setForced(boolean forced) {
- this.forced = forced;
+ public void setBypassExclusionMechanism(boolean forced) {
+ this.bypassExclusionMechanism = forced;
}
- public boolean isForced() {
- return forced == null ? false : forced;
+ public boolean isBypassExclusionMechanism() {
+ return bypassExclusionMechanism == null ? false : bypassExclusionMechanism;
}
public CodeCheck getChecker() {