import plugins.checks.RpgCheck;
import plugins.checks.SwiftCheck;
import plugins.checks.Validation;
+import plugins.checks.VbCheck;
import plugins.checks.WebCheck;
/**
/**
* Temporarily disabled plugins. To be re-enabled.
*/
- static final Set<String> DISABLED_PLUGINS = Sets.newHashSet("devcockpit", "views", /* FIXME */"vb");
+ static final Set<String> DISABLED_PLUGINS = Sets.newHashSet("devcockpit", "views");
- /**
- * See http://license.internal.sonarsource.com/it/
- */
static final Set<String> LICENSED_PLUGINS = Sets.newHashSet(
"abap", "cobol", "cpp", "devcockpit", "objc", "pli", "plsql", "report", "rpg",
"sqale", "swift", "vb", "vbnet", "views");
// TODO new PliCheck() is temporarily disabled as PLI plugin does not support multi-language feature. See sonar-project.properties
static final List<Check> CHECKS = Arrays.asList((Check) new AbapCheck(), new CobolCheck(), new CCheck(), new CppCheck(), new CssCheck(),
new FlexCheck(), new GroovyCheck(), new JavaCheck(), new JavascriptCheck(), new PhpCheck(), new RpgCheck(),
- new PythonCheck(), new SwiftCheck(), /* FIXME new VbCheck(), */ new WebCheck());
+ new PythonCheck(), new SwiftCheck(), new VbCheck(), new WebCheck());
static Orchestrator orchestrator;
import org.sonar.api.utils.Duration;
import org.sonar.core.issue.tracking.Trackable;
+import static java.lang.String.format;
+
/**
* PLUGINS MUST NOT BE USED THIS CLASS, EXCEPT FOR UNIT TESTING.
*
}
public DefaultIssue setLine(@Nullable Integer l) {
- Preconditions.checkArgument(l == null || l > 0, "Line must be null or greater than zero (got " + l + ")");
+ Preconditions.checkArgument(l == null || l > 0, format("Line must be null or greater than zero (got %d)", l));
this.line = l;
return this;
}
}
public DefaultIssue setEffortToFix(@Nullable Double d) {
- //Preconditions.checkArgument(d == null || d >= 0, "Effort to fix must be greater than or equal 0 (got " + d + ")");
- if (d != null) {
- // FIXME this is temp hack while Decorator are not dropped (Comment Density common-rule is buggy as
- // the measure comment_line_density is compute by CE)
- this.effortToFix = Math.max(d, 0.0);
- } else {
- this.effortToFix = null;
- }
+ Preconditions.checkArgument(d == null || d >= 0, format("Effort to fix must be greater than or equal 0 (got %s)", d));
+ this.effortToFix = d;
return this;
}