diff options
Diffstat (limited to 'sonar-squid/src/main/java')
-rw-r--r-- | sonar-squid/src/main/java/org/sonar/squid/api/CheckMessage.java | 10 | ||||
-rw-r--r-- | sonar-squid/src/main/java/org/sonar/squid/api/SourceCode.java | 2 |
2 files changed, 11 insertions, 1 deletions
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 e9caeb3e2af..1c56f8a4fb9 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,6 +33,7 @@ public class CheckMessage implements Message { private CodeCheck codeCheck; private String defaultMessage; private Object[] messageArguments; + private Boolean forced; public CheckMessage(CodeCheck rule, String message, Object... messageArguments) { this.codeCheck = rule; @@ -64,6 +65,14 @@ public class CheckMessage implements Message { return cost; } + public void setForced(boolean forced) { + this.forced = forced; + } + + public boolean isForced() { + return forced == null ? false : forced; + } + public CodeCheck getChecker() { return codeCheck; } @@ -93,4 +102,5 @@ public class CheckMessage implements Message { return MessageFormat.format(defaultMessage, messageArguments); } } + } diff --git a/sonar-squid/src/main/java/org/sonar/squid/api/SourceCode.java b/sonar-squid/src/main/java/org/sonar/squid/api/SourceCode.java index 0cedaf8bc03..03d3ce8fc8a 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/api/SourceCode.java +++ b/sonar-squid/src/main/java/org/sonar/squid/api/SourceCode.java @@ -262,7 +262,7 @@ public abstract class SourceCode implements Measurable, Comparable<SourceCode> { return false; } - protected boolean hasChildren() { + public boolean hasChildren() { return children != null && children.size() != 0; } |