project_deletion.page=Delete {0}
project_deletion.page.description=Delete this project from the SonarQube database.
provisioning.page=Provisioning
-provisioning.page.description=Use this page to initialize projects if you would like to configure them before the first analysis. \
- Once a project is provisioned, you have access to perform all project configurations on it.
+provisioning.page.description=Use this page to initialize projects if you would like to configure them before the first analysis. Once a project is provisioned, you have access to perform all project configurations on it.
#------------------------------------------------------------------------------
#
metric.complexity.description=Cyclomatic complexity
metric.complexity.abbreviation=Cmpx
+metric.complexity_in_classes.name=Complexity in Classes
+metric.complexity_in_classes.description=Cyclomatic complexity in classes
+
+metric.complexity_in_functions.name=Complexity in Functions
+metric.complexity_in_functions.description=Cyclomatic complexity in functions
+
+metric.development_cost.name=SQALE Development Cost
+
metric.directories.name=Directories
metric.directories.description=Directories
metric.directories.abbreviation=Dirs
+metric.effort_to_reach_maintainability_rating_a.name=Effort to Reach Maintainability Rating A
+metric.effort_to_reach_maintainability_rating_a.description=Effort to reach maintainability rating A
+
metric.files.name=Files
metric.files.description=Number of files
metric.generated_ncloc.description=Generated non Commenting Lines of Code
metric.generated_ncloc.abbreviation=Gen. LOC
+metric.last_commit_date.name=Date of Last Commit
+
metric.lines.name=Lines
metric.lines.description=Lines
+metric.new_reliability_remediation_effort.name=Reliability Remediation Effort on New Code
+metric.new_reliability_remediation_effort.description=Reliability remediation effort on new code
+
+metric.new_security_remediation_effort.name=Security Remediation Effort on New Code
+metric.new_security_remediation_effort.description=Security remediation effort on new code
+
metric.ncloc.name=Lines of Code
metric.ncloc.description=Non Commenting Lines of Code
metric.ncloc.abbreviation=LOC
+metric.ncloc_language_distribution.name=Lines of Code Per Language
+metric.ncloc_language_distribution.description=Non Commenting Lines of Code Distributed By Language
+
metric.packages.name=Packages
metric.packages.description=Packages
metric.packages.abbreviation=Pkgs
+metric.projects.name=Projects
+metric.projects.description=Number of projects
+
metric.public_api.name=Public API
metric.public_api.description=Public API
metric.public_undocumented_api.description=Public undocumented classes, functions and variables
metric.public_undocumented_api.abbreviation=Pub. undoc. API
+metric.quality_gate_details.name=Quality Gate Details
+metric.quality_gate_details.description=The project detailed status with regard to its quality gate
+
+metric.quality_profiles.name=Profiles
+metric.quality_profiles.description=Details of quality profiles used during analysis
+
+metric.reliability_rating.description=Reliability rating
+metric.reliability_remediation_effort.description=Reliability Remediation Effort
+
+metric.security_rating.description=Security rating
+metric.security_remediation_effort.description=Security remediation effort
+
metric.statements.name=Statements
metric.statements.description=Number of statements
metric.statements.abbreviation=Stmts
metric.profile_version.description=Selected quality profile version
-#--------------------------------------------------------------------------------------------------------------------
-#
-# ISSUES METRICS
-#
-#--------------------------------------------------------------------------------------------------------------------
-
metric.false_positive_issues.name=False Positive Issues
metric.false_positive_issues.description=False positive issues
-metric.wont_fix_issues.name=Won't Fix Issues
+metric.wont_fix_issues.name=Won't Fix Issues
metric.wont_fix_issues.description=Won't fix issues
metric.open_issues.name=Open Issues
metric.confirmed_issues.description=Confirmed issues
-#--------------------------------------------------------------------------------------------------------------------
-#
-# TECHNICAL DEBT METRICS
-#
-#--------------------------------------------------------------------------------------------------------------------
-
metric.sqale_index.name=Technical Debt
metric.sqale_index.short_name=Effort
metric.sqale_index.description=Total effort (in days) to fix all the issues on the component and therefore to comply to all the requirements.
metric.new_technical_debt.name=Added Technical Debt
metric.new_technical_debt.short_name=Added Debt
-metric.new_technical_debt.description=Added Technical Debt
+metric.new_technical_debt.description=Added technical debt
metric.sqale_rating.name=Maintainability Rating
-metric.sqale_rating.description=A-to-E rating based on the technical debt ratio.
+metric.sqale_rating.description=A-to-E rating based on the technical debt ratio
metric.sqale_debt_ratio.name=Technical Debt Ratio
metric.sqale_debt_ratio.short_name=Debt Ratio
-metric.sqale_debt_ratio.description=Ratio of the actual technical debt compared to the estimated cost to develop the whole source code from scratch.
+metric.sqale_debt_ratio.description=Ratio of the actual technical debt compared to the estimated cost to develop the whole source code from scratch
metric.new_sqale_debt_ratio.name=Technical Debt Ratio on New Code
metric.new_sqale_debt_ratio.short_name=Debt Ratio on new code
*/
package org.sonar.core.i18n;
+import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Locale;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
+import org.sonar.api.measures.CoreMetrics;
+import org.sonar.api.measures.Metric;
import org.sonar.api.utils.DateUtils;
import org.sonar.api.utils.System2;
import org.sonar.core.platform.PluginInfo;
@Mock
System2 system2;
- DefaultI18n manager;
+ DefaultI18n underTest;
@Before
public void before() {
List<PluginInfo> plugins = Arrays.asList(newPlugin("sqale"), newPlugin("frpack"), newPlugin("checkstyle"), newPlugin("other"));
when(pluginRepository.getPluginInfos()).thenReturn(plugins);
- manager = new DefaultI18n(pluginRepository, system2);
- manager.doStart(getClass().getClassLoader());
+ underTest = new DefaultI18n(pluginRepository, system2);
+ underTest.doStart(getClass().getClassLoader());
}
@Test
public void load_core_bundle() {
- assertThat(manager.message(Locale.ENGLISH, "any", null)).isEqualTo("Any");
+ assertThat(underTest.message(Locale.ENGLISH, "any", null)).isEqualTo("Any");
}
@Test
public void introspect_all_available_properties() {
- assertThat(manager.getPropertyKeys().contains("any")).isTrue();
+ assertThat(underTest.getPropertyKeys().contains("any")).isTrue();
// Only in english
- assertThat(manager.getPropertyKeys().contains("assignee")).isTrue();
- assertThat(manager.getPropertyKeys().contains("sqale.page")).isTrue();
- assertThat(manager.getPropertyKeys().contains("bla_bla_bla")).isFalse();
+ assertThat(underTest.getPropertyKeys().contains("assignee")).isTrue();
+ assertThat(underTest.getPropertyKeys().contains("sqale.page")).isTrue();
+ assertThat(underTest.getPropertyKeys().contains("bla_bla_bla")).isFalse();
+ }
+
+ @Test
+ public void all_core_metrics_are_in_core_bundle() {
+ List<Metric> coreMetrics = CoreMetrics.getMetrics();
+ List<String> incorrectMetricDefinitions = new ArrayList<>();
+ for (Metric metric : coreMetrics) {
+ if (metric.isHidden()) {
+ continue;
+ }
+ String metricNamePropertyKey = "metric." + metric.getKey() + ".name";
+ String l10nMetricName = underTest.message(Locale.ENGLISH, metricNamePropertyKey, null);
+ if (l10nMetricName == null) {
+ incorrectMetricDefinitions.add(metricNamePropertyKey + "=" + metric.getName());
+ } else if (!l10nMetricName.equals(metric.getName())) {
+ incorrectMetricDefinitions.add(metricNamePropertyKey + " is not consistent in core bundle and CoreMetrics");
+ }
+
+ String metricDescriptionPropertyKey = "metric." + metric.getKey() + ".description";
+ String l10nMetricDescription = underTest.message(Locale.ENGLISH, metricDescriptionPropertyKey, null);
+ if (l10nMetricDescription == null) {
+ incorrectMetricDefinitions.add(metricDescriptionPropertyKey + "=" + metric.getDescription());
+ } else if (!l10nMetricDescription.equals(metric.getDescription())) {
+ incorrectMetricDefinitions.add(metricDescriptionPropertyKey + " is not consistent in core bundle and CoreMetrics");
+ }
+ }
+
+ assertThat(incorrectMetricDefinitions).as("Metric definitions to fix in core bundle", incorrectMetricDefinitions.size()).isEmpty();
}
@Test
public void get_english_labels() {
- assertThat(manager.message(Locale.ENGLISH, "any", null)).isEqualTo("Any");
- assertThat(manager.message(Locale.ENGLISH, "sqale.page", null)).isEqualTo("Sqale page title");
- assertThat(manager.message(Locale.ENGLISH, "checkstyle.rule1.name", null)).isEqualTo("Rule one");
+ assertThat(underTest.message(Locale.ENGLISH, "any", null)).isEqualTo("Any");
+ assertThat(underTest.message(Locale.ENGLISH, "sqale.page", null)).isEqualTo("Sqale page title");
+ assertThat(underTest.message(Locale.ENGLISH, "checkstyle.rule1.name", null)).isEqualTo("Rule one");
}
// SONAR-2927
Locale defaultLocale = Locale.getDefault();
try {
Locale.setDefault(Locale.FRENCH);
- assertThat(manager.message(Locale.ENGLISH, "any", null)).isEqualTo("Any");
- assertThat(manager.message(Locale.ENGLISH, "sqale.page", null)).isEqualTo("Sqale page title");
- assertThat(manager.message(Locale.ENGLISH, "checkstyle.rule1.name", null)).isEqualTo("Rule one");
+ assertThat(underTest.message(Locale.ENGLISH, "any", null)).isEqualTo("Any");
+ assertThat(underTest.message(Locale.ENGLISH, "sqale.page", null)).isEqualTo("Sqale page title");
+ assertThat(underTest.message(Locale.ENGLISH, "checkstyle.rule1.name", null)).isEqualTo("Rule one");
} finally {
Locale.setDefault(defaultLocale);
}
@Test
public void get_labels_from_french_pack() {
- assertThat(manager.message(Locale.FRENCH, "checkstyle.rule1.name", null)).isEqualTo("Rule un");
- assertThat(manager.message(Locale.FRENCH, "any", null)).isEqualTo("Tous");
+ assertThat(underTest.message(Locale.FRENCH, "checkstyle.rule1.name", null)).isEqualTo("Rule un");
+ assertThat(underTest.message(Locale.FRENCH, "any", null)).isEqualTo("Tous");
// language pack
- assertThat(manager.message(Locale.FRENCH, "sqale.page", null)).isEqualTo("Titre de la page Sqale");
+ assertThat(underTest.message(Locale.FRENCH, "sqale.page", null)).isEqualTo("Titre de la page Sqale");
}
@Test
public void get_french_label_if_swiss_country() {
Locale swiss = new Locale("fr", "CH");
- assertThat(manager.message(swiss, "checkstyle.rule1.name", null)).isEqualTo("Rule un");
- assertThat(manager.message(swiss, "any", null)).isEqualTo("Tous");
+ assertThat(underTest.message(swiss, "checkstyle.rule1.name", null)).isEqualTo("Rule un");
+ assertThat(underTest.message(swiss, "any", null)).isEqualTo("Tous");
// language pack
- assertThat(manager.message(swiss, "sqale.page", null)).isEqualTo("Titre de la page Sqale");
+ assertThat(underTest.message(swiss, "sqale.page", null)).isEqualTo("Titre de la page Sqale");
}
@Test
public void fallback_to_default_locale() {
- assertThat(manager.message(Locale.CHINA, "checkstyle.rule1.name", null)).isEqualTo("Rule one");
- assertThat(manager.message(Locale.CHINA, "any", null)).isEqualTo("Any");
- assertThat(manager.message(Locale.CHINA, "sqale.page", null)).isEqualTo("Sqale page title");
+ assertThat(underTest.message(Locale.CHINA, "checkstyle.rule1.name", null)).isEqualTo("Rule one");
+ assertThat(underTest.message(Locale.CHINA, "any", null)).isEqualTo("Any");
+ assertThat(underTest.message(Locale.CHINA, "sqale.page", null)).isEqualTo("Sqale page title");
}
@Test
public void return_default_value_if_missing_key() {
- assertThat(manager.message(Locale.ENGLISH, "bla_bla_bla", "default")).isEqualTo("default");
- assertThat(manager.message(Locale.FRENCH, "bla_bla_bla", "default")).isEqualTo("default");
+ assertThat(underTest.message(Locale.ENGLISH, "bla_bla_bla", "default")).isEqualTo("default");
+ assertThat(underTest.message(Locale.FRENCH, "bla_bla_bla", "default")).isEqualTo("default");
}
@Test
public void format_message_with_parameters() {
- assertThat(manager.message(Locale.ENGLISH, "name_too_long_x", null, "10")).isEqualTo("Name is too long (maximum is 10 characters)");
+ assertThat(underTest.message(Locale.ENGLISH, "name_too_long_x", null, "10")).isEqualTo("Name is too long (maximum is 10 characters)");
}
@Test
public void use_default_locale_if_missing_value_in_localized_bundle() {
- assertThat(manager.message(Locale.FRENCH, "assignee", null)).isEqualTo("Assignee");
- assertThat(manager.message(Locale.CHINA, "assignee", null)).isEqualTo("Assignee");
+ assertThat(underTest.message(Locale.FRENCH, "assignee", null)).isEqualTo("Assignee");
+ assertThat(underTest.message(Locale.CHINA, "assignee", null)).isEqualTo("Assignee");
}
@Test
public void return_null_if_file_not_found() {
- String html = manager.messageFromFile(Locale.ENGLISH, "UnknownRule.html", "checkstyle.rule1.name");
+ String html = underTest.messageFromFile(Locale.ENGLISH, "UnknownRule.html", "checkstyle.rule1.name");
assertThat(html).isNull();
}
@Test
public void return_null_if_rule_not_internationalized() {
- String html = manager.messageFromFile(Locale.ENGLISH, "UnknownRule.html", "foo.rule1.name");
+ String html = underTest.messageFromFile(Locale.ENGLISH, "UnknownRule.html", "foo.rule1.name");
assertThat(html).isNull();
}
@Test
public void get_age_with_duration() {
- assertThat(manager.age(Locale.ENGLISH, 10)).isEqualTo("less than a minute");
+ assertThat(underTest.age(Locale.ENGLISH, 10)).isEqualTo("less than a minute");
}
@Test
public void get_age_with_dates() {
- assertThat(manager.age(Locale.ENGLISH, DateUtils.parseDate("2014-01-01"), DateUtils.parseDate("2014-01-02"))).isEqualTo("a day");
+ assertThat(underTest.age(Locale.ENGLISH, DateUtils.parseDate("2014-01-01"), DateUtils.parseDate("2014-01-02"))).isEqualTo("a day");
}
@Test
public void get_age_from_now() {
when(system2.now()).thenReturn(DateUtils.parseDate("2014-01-02").getTime());
- assertThat(manager.ageFromNow(Locale.ENGLISH, DateUtils.parseDate("2014-01-01"))).isEqualTo("a day");
+ assertThat(underTest.ageFromNow(Locale.ENGLISH, DateUtils.parseDate("2014-01-01"))).isEqualTo("a day");
}
@Test
public void format_date_time() {
TimeZone initialTz = TimeZone.getDefault();
TimeZone.setDefault(TimeZone.getTimeZone("GMT+1"));
- assertThat(manager.formatDateTime(Locale.ENGLISH, DateUtils.parseDateTime("2014-01-22T19:10:03+0100"))).startsWith("Jan 22, 2014");
+ assertThat(underTest.formatDateTime(Locale.ENGLISH, DateUtils.parseDateTime("2014-01-22T19:10:03+0100"))).startsWith("Jan 22, 2014");
TimeZone.setDefault(initialTz);
}
public void format_date() {
TimeZone initialTz = TimeZone.getDefault();
TimeZone.setDefault(TimeZone.getTimeZone("GMT+1"));
- assertThat(manager.formatDate(Locale.ENGLISH, DateUtils.parseDateTime("2014-01-22T19:10:03+0100"))).isEqualTo("Jan 22, 2014");
+ assertThat(underTest.formatDate(Locale.ENGLISH, DateUtils.parseDateTime("2014-01-22T19:10:03+0100"))).isEqualTo("Jan 22, 2014");
TimeZone.setDefault(initialTz);
}
@Test
public void format_double() {
- assertThat(manager.formatDouble(Locale.FRENCH, 10.56)).isEqualTo("10,6");
- assertThat(manager.formatDouble(Locale.FRENCH, 10d)).isEqualTo("10,0");
+ assertThat(underTest.formatDouble(Locale.FRENCH, 10.56)).isEqualTo("10,6");
+ assertThat(underTest.formatDouble(Locale.FRENCH, 10d)).isEqualTo("10,0");
}
@Test
public void format_integer() {
- assertThat(manager.formatInteger(Locale.ENGLISH, 10)).isEqualTo("10");
- assertThat(manager.formatInteger(Locale.ENGLISH, 100000)).isEqualTo("100,000");
+ assertThat(underTest.formatInteger(Locale.ENGLISH, 10)).isEqualTo("10");
+ assertThat(underTest.formatInteger(Locale.ENGLISH, 100000)).isEqualTo("100,000");
}
private PluginInfo newPlugin(String key) {
* @deprecated in 3.0 - see SONAR-3289
*/
@Deprecated
- public static final Metric<String> CLASS_COMPLEXITY_DISTRIBUTION = new Metric.Builder(CLASS_COMPLEXITY_DISTRIBUTION_KEY, "Classes Distribution / Complexity",
+ public static final Metric<String> CLASS_COMPLEXITY_DISTRIBUTION = new Metric.Builder(CLASS_COMPLEXITY_DISTRIBUTION_KEY, "Class Distribution / Complexity",
Metric.ValueType.DISTRIB)
.setDescription("Classes distribution /complexity")
.setDirection(Metric.DIRECTION_NONE)
.create();
public static final String FUNCTION_COMPLEXITY_DISTRIBUTION_KEY = "function_complexity_distribution";
- public static final Metric<String> FUNCTION_COMPLEXITY_DISTRIBUTION = new Metric.Builder(FUNCTION_COMPLEXITY_DISTRIBUTION_KEY, "Functions Distribution / Complexity",
+ public static final Metric<String> FUNCTION_COMPLEXITY_DISTRIBUTION = new Metric.Builder(FUNCTION_COMPLEXITY_DISTRIBUTION_KEY, "Function Distribution / Complexity",
Metric.ValueType.DISTRIB)
.setDescription("Functions distribution /complexity")
.setDirection(Metric.DIRECTION_NONE)
.create();
public static final String FILE_COMPLEXITY_DISTRIBUTION_KEY = "file_complexity_distribution";
- public static final Metric<String> FILE_COMPLEXITY_DISTRIBUTION = new Metric.Builder(FILE_COMPLEXITY_DISTRIBUTION_KEY, "Files Distribution / Complexity",
+ public static final Metric<String> FILE_COMPLEXITY_DISTRIBUTION = new Metric.Builder(FILE_COMPLEXITY_DISTRIBUTION_KEY, "File Distribution / Complexity",
Metric.ValueType.DISTRIB)
.setDescription("Files distribution /complexity")
.setDirection(Metric.DIRECTION_NONE)
public static final String NEW_LINES_TO_COVER_KEY = "new_lines_to_cover";
public static final Metric<Integer> NEW_LINES_TO_COVER = new Metric.Builder(NEW_LINES_TO_COVER_KEY, "Lines to Cover on New Code", Metric.ValueType.INT)
- .setDescription("Lines to cover on New Code")
+ .setDescription("Lines to cover on new code")
.setDirection(Metric.DIRECTION_WORST)
.setQualitative(false)
.setDomain(DOMAIN_COVERAGE)
public static final String NEW_UNCOVERED_LINES_KEY = "new_uncovered_lines";
public static final Metric<Integer> NEW_UNCOVERED_LINES = new Metric.Builder(NEW_UNCOVERED_LINES_KEY, "Uncovered Lines on New Code", Metric.ValueType.INT)
- .setDescription("Uncovered lines on New Code")
+ .setDescription("Uncovered lines on new code")
.setDirection(Metric.DIRECTION_WORST)
.setDomain(DOMAIN_COVERAGE)
.setBestValue(0.0)
*/
@Deprecated
public static final Metric<String> COVERAGE_LINE_HITS_DATA = new Metric.Builder(COVERAGE_LINE_HITS_DATA_KEY, "Coverage Hits by Line", Metric.ValueType.DATA)
+ .setDescription("Coverage hits by line")
.setDomain(DOMAIN_COVERAGE)
.setDeleteHistoricalData(true)
.create();
/**
* Use {@link CoverageMeasuresBuilder} to build measure for this metric.
*/
- public static final Metric<Integer> UNCOVERED_CONDITIONS = new Metric.Builder(UNCOVERED_CONDITIONS_KEY, "Uncovered Branches", Metric.ValueType.INT)
- .setDescription("Uncovered branches")
+ public static final Metric<Integer> UNCOVERED_CONDITIONS = new Metric.Builder(UNCOVERED_CONDITIONS_KEY, "Uncovered Conditions", Metric.ValueType.INT)
+ .setDescription("Uncovered conditions")
.setDirection(Metric.DIRECTION_WORST)
.setDomain(DOMAIN_COVERAGE)
.setBestValue(0.0)
.create();
public static final String NEW_UNCOVERED_CONDITIONS_KEY = "new_uncovered_conditions";
- public static final Metric<Integer> NEW_UNCOVERED_CONDITIONS = new Metric.Builder(NEW_UNCOVERED_CONDITIONS_KEY, "Uncovered Branches on New Code", Metric.ValueType.INT)
- .setDescription("Uncovered branches on New Code")
+ public static final Metric<Integer> NEW_UNCOVERED_CONDITIONS = new Metric.Builder(NEW_UNCOVERED_CONDITIONS_KEY, "Uncovered Conditions on New Code", Metric.ValueType.INT)
+ .setDescription("Uncovered conditions on new code")
.setDirection(Metric.DIRECTION_WORST)
.setDomain(DOMAIN_COVERAGE)
.setBestValue(0.0)
*/
@Deprecated
public static final Metric<String> CONDITIONS_BY_LINE = new Metric.Builder(CONDITIONS_BY_LINE_KEY, "Conditions by Line", Metric.ValueType.DATA)
+ .setDescription("Conditions by line")
.setDomain(DOMAIN_COVERAGE)
.setDeleteHistoricalData(true)
.create();
*/
@Deprecated
public static final Metric<String> COVERED_CONDITIONS_BY_LINE = new Metric.Builder(COVERED_CONDITIONS_BY_LINE_KEY, "Covered Conditions by Line", Metric.ValueType.DATA)
+ .setDescription("Covered conditions by line")
.setDomain(DOMAIN_COVERAGE)
.setDeleteHistoricalData(true)
.create();
/**
* @since 2.12
*/
- public static final Metric<Double> IT_COVERAGE = new Metric.Builder(IT_COVERAGE_KEY, "IT coverage", Metric.ValueType.PERCENT)
- .setDescription("Coverage by integration tests")
+ public static final Metric<Double> IT_COVERAGE = new Metric.Builder(IT_COVERAGE_KEY, "IT Coverage", Metric.ValueType.PERCENT)
+ .setDescription("Integration tests coverage")
.setDirection(Metric.DIRECTION_BETTER)
.setQualitative(true)
.setDomain(DOMAIN_COVERAGE)
* @since 2.12
*/
public static final Metric<Double> NEW_IT_COVERAGE = new Metric.Builder(NEW_IT_COVERAGE_KEY, "Coverage by IT on New Code", Metric.ValueType.PERCENT)
- .setDescription("Integration Tests Coverage of new/changed code")
+ .setDescription("Integration tests coverage of new/changed code")
.setDirection(Metric.DIRECTION_BETTER)
.setQualitative(true)
.setDomain(DOMAIN_COVERAGE)
* @since 2.12
*/
public static final Metric<Integer> NEW_IT_LINES_TO_COVER = new Metric.Builder(NEW_IT_LINES_TO_COVER_KEY, "Lines to Cover by IT on New Code", Metric.ValueType.INT)
- .setDescription("Lines to cover by Integration Tests on New Code")
+ .setDescription("Lines to cover on new code by integration tests")
.setDirection(Metric.DIRECTION_WORST)
.setQualitative(false)
.setDomain(DOMAIN_COVERAGE)
* @since 2.12
*/
public static final Metric<Integer> IT_UNCOVERED_LINES = new Metric.Builder(IT_UNCOVERED_LINES_KEY, "IT Uncovered Lines", Metric.ValueType.INT)
- .setDescription("IT uncovered lines")
+ .setDescription("Uncovered lines by integration tests")
.setDirection(Metric.DIRECTION_WORST)
.setQualitative(false)
.setDomain(DOMAIN_COVERAGE)
* @since 2.12
*/
public static final Metric<Integer> NEW_IT_UNCOVERED_LINES = new Metric.Builder(NEW_IT_UNCOVERED_LINES_KEY, "Uncovered Lines by IT on New Code", Metric.ValueType.INT)
- .setDescription("Uncovered lines by IT on New Code")
+ .setDescription("New lines that are not covered by integration tests")
.setDirection(Metric.DIRECTION_WORST)
.setDomain(DOMAIN_COVERAGE)
.setBestValue(0.0)
* @since 2.12
*/
public static final Metric<Double> IT_LINE_COVERAGE = new Metric.Builder(IT_LINE_COVERAGE_KEY, "IT Line Coverage", Metric.ValueType.PERCENT)
- .setDescription("IT line coverage")
+ .setDescription("Line coverage by integration tests")
.setDirection(Metric.DIRECTION_BETTER)
.setQualitative(true)
.setDomain(DOMAIN_COVERAGE)
* @since 2.12
*/
public static final Metric<Double> NEW_IT_LINE_COVERAGE = new Metric.Builder(NEW_IT_LINE_COVERAGE_KEY, "Line Coverage by IT on New Code", Metric.ValueType.PERCENT)
- .setDescription("Line Coverage by Integration Tests of added/changed code")
+ .setDescription("Integration tests line coverage of added/changed code")
.setDirection(Metric.DIRECTION_BETTER)
.setQualitative(true)
.setWorstValue(0.0)
* @deprecated since 5.2 soon to be removed
*/
@Deprecated
- public static final Metric<String> IT_COVERAGE_LINE_HITS_DATA = new Metric.Builder(IT_COVERAGE_LINE_HITS_DATA_KEY, "IT Coverage Hits Data", Metric.ValueType.DATA)
- .setDescription("Integration Tests Code coverage line hits data")
+ public static final Metric<String> IT_COVERAGE_LINE_HITS_DATA = new Metric.Builder(IT_COVERAGE_LINE_HITS_DATA_KEY, "IT Coverage Hits by Line", Metric.ValueType.DATA)
+ .setDescription("Coverage hits by line by integration tests")
.setDirection(Metric.DIRECTION_NONE)
.setQualitative(false)
.setDomain(DOMAIN_COVERAGE)
/**
* @since 2.12
*/
- public static final Metric<Integer> IT_UNCOVERED_CONDITIONS = new Metric.Builder(IT_UNCOVERED_CONDITIONS_KEY, "IT Uncovered Branches", Metric.ValueType.INT)
- .setDescription("Integration Tests uncovered conditions")
+ public static final Metric<Integer> IT_UNCOVERED_CONDITIONS = new Metric.Builder(IT_UNCOVERED_CONDITIONS_KEY, "IT Uncovered Conditions", Metric.ValueType.INT)
+ .setDescription("Uncovered conditions by integration tests")
.setDirection(Metric.DIRECTION_WORST)
.setDomain(DOMAIN_COVERAGE)
.create();
/**
* @since 2.12
*/
- public static final Metric<Integer> NEW_IT_UNCOVERED_CONDITIONS = new Metric.Builder(NEW_IT_UNCOVERED_CONDITIONS_KEY, "Uncovered Branches by IT on New Code",
+ public static final Metric<Integer> NEW_IT_UNCOVERED_CONDITIONS = new Metric.Builder(NEW_IT_UNCOVERED_CONDITIONS_KEY, "Uncovered Conditions by IT on New Code",
Metric.ValueType.INT)
- .setDescription("Uncovered branches by Integration Tests on New Code")
+ .setDescription("New conditions that are not covered by integration tests")
.setDirection(Metric.DIRECTION_WORST)
.setDomain(DOMAIN_COVERAGE)
.setBestValue(0.0)
* @since 2.12
*/
public static final Metric<Double> IT_BRANCH_COVERAGE = new Metric.Builder(IT_BRANCH_COVERAGE_KEY, "IT Condition Coverage", Metric.ValueType.PERCENT)
- .setDescription("IT condition coverage")
+ .setDescription("Condition coverage by integration tests")
.setDirection(Metric.DIRECTION_BETTER)
.setQualitative(true)
.setDomain(DOMAIN_COVERAGE)
* @since 2.12
*/
public static final Metric<Double> NEW_IT_BRANCH_COVERAGE = new Metric.Builder(NEW_IT_BRANCH_COVERAGE_KEY, "Condition Coverage by IT on New Code", Metric.ValueType.PERCENT)
- .setDescription("Condition coverage by Integration Tests of new/changed code")
+ .setDescription("Integration tests condition coverage of new/changed code")
.setDirection(Metric.DIRECTION_BETTER)
.setQualitative(true)
.setDomain(DOMAIN_COVERAGE)
*/
@Deprecated
public static final Metric<String> IT_CONDITIONS_BY_LINE = new Metric.Builder(IT_CONDITIONS_BY_LINE_KEY, "IT Conditions by Line", Metric.ValueType.DATA)
+ .setDescription("IT conditions by line")
.setDomain(DOMAIN_COVERAGE)
.setDeleteHistoricalData(true)
.create();
*/
@Deprecated
public static final Metric<String> IT_COVERED_CONDITIONS_BY_LINE = new Metric.Builder(IT_COVERED_CONDITIONS_BY_LINE_KEY, "IT Covered Conditions by Line", Metric.ValueType.DATA)
+ .setDescription("IT covered conditions by line")
.setDomain(DOMAIN_COVERAGE)
.setDeleteHistoricalData(true)
.create();
/**
* @since 3.3
*/
- public static final Metric<Integer> OVERALL_UNCOVERED_CONDITIONS = new Metric.Builder(OVERALL_UNCOVERED_CONDITIONS_KEY, "Overall Uncovered Branches", Metric.ValueType.INT)
- .setDescription("Uncovered branches by all tests")
+ public static final Metric<Integer> OVERALL_UNCOVERED_CONDITIONS = new Metric.Builder(OVERALL_UNCOVERED_CONDITIONS_KEY, "Overall Uncovered Conditions", Metric.ValueType.INT)
+ .setDescription("Uncovered conditions by all tests")
.setDirection(Metric.DIRECTION_WORST)
.setDomain(DOMAIN_COVERAGE)
.create();
/**
* @since 3.3
*/
- public static final Metric<Integer> NEW_OVERALL_UNCOVERED_CONDITIONS = new Metric.Builder(NEW_OVERALL_UNCOVERED_CONDITIONS_KEY, "Overall Uncovered Branches on New Code",
+ public static final Metric<Integer> NEW_OVERALL_UNCOVERED_CONDITIONS = new Metric.Builder(NEW_OVERALL_UNCOVERED_CONDITIONS_KEY, "Overall Uncovered Conditions on New Code",
Metric.ValueType.INT)
- .setDescription("New branches that are not covered by any test")
+ .setDescription("New conditions that are not covered by any test")
.setDirection(Metric.DIRECTION_WORST)
.setDomain(DOMAIN_COVERAGE)
.setBestValue(0.0)
* @deprecated since 5.2 soon to be removed
*/
@Deprecated
- public static final Metric<String> OVERALL_COVERED_CONDITIONS_BY_LINE = new Metric.Builder(OVERALL_COVERED_CONDITIONS_BY_LINE_KEY, "Overall Covered Branches by Line",
+ public static final Metric<String> OVERALL_COVERED_CONDITIONS_BY_LINE = new Metric.Builder(OVERALL_COVERED_CONDITIONS_BY_LINE_KEY, "Overall Covered Conditions by Line",
Metric.ValueType.DATA)
- .setDescription("Overall covered branches by all tests and by line")
+ .setDescription("Overall covered conditions by all tests and by line")
.setDomain(DOMAIN_COVERAGE)
.setDeleteHistoricalData(true)
.create();
public static final String NEW_VIOLATIONS_KEY = "new_violations";
public static final Metric<Integer> NEW_VIOLATIONS = new Metric.Builder(NEW_VIOLATIONS_KEY, "New Issues", Metric.ValueType.INT)
- .setDescription("New Issues")
+ .setDescription("New issues")
.setDirection(Metric.DIRECTION_WORST)
.setQualitative(true)
.setDomain(DOMAIN_ISSUES)
*/
// TODO should be renamed to MAINTAINABILITY_REMEDIATION_EFFORT
public static final Metric<Long> TECHNICAL_DEBT = new Metric.Builder(TECHNICAL_DEBT_KEY, "Technical Debt", Metric.ValueType.WORK_DUR)
+ .setDescription("Total effort (in days) to fix all the issues on the component and therefore to comply to all the requirements.")
.setDomain(DOMAIN_MAINTAINABILITY)
.setDirection(Metric.DIRECTION_WORST)
.setOptimizedBestValue(true)
* @since 4.1
*/
// TODO should be renamed to NEW_MAINTAINABILITY_REMEDIATION_EFFORT
- public static final Metric<Long> NEW_TECHNICAL_DEBT = new Metric.Builder(NEW_TECHNICAL_DEBT_KEY, "Technical Debt on New Code", Metric.ValueType.WORK_DUR)
- .setDescription("Technical Debt of new code")
+ public static final Metric<Long> NEW_TECHNICAL_DEBT = new Metric.Builder(NEW_TECHNICAL_DEBT_KEY, "Added Technical Debt", Metric.ValueType.WORK_DUR)
+ .setDescription("Added technical debt")
.setDomain(DOMAIN_MAINTAINABILITY)
.setDirection(Metric.DIRECTION_WORST)
.setOptimizedBestValue(true)
*/
// TODO should be renamed to MAINTAINABILITY_RATING
public static final Metric<Integer> SQALE_RATING = new Metric.Builder(SQALE_RATING_KEY, "Maintainability Rating", Metric.ValueType.RATING)
+ .setDescription("A-to-E rating based on the technical debt ratio")
.setDomain(DOMAIN_MAINTAINABILITY)
.setDirection(Metric.DIRECTION_WORST)
.setQualitative(true)
* @since 4.5
*/
public static final Metric<String> DEVELOPMENT_COST = new Metric.Builder(DEVELOPMENT_COST_KEY, "SQALE Development Cost", Metric.ValueType.STRING)
+ .setDescription("SQALE development cost")
.setDomain(DOMAIN_MAINTAINABILITY)
.setDirection(Metric.DIRECTION_WORST)
.setOptimizedBestValue(true)
*/
// TODO should be renamed to TECHNICALDEBT_RATIO
public static final Metric<Double> SQALE_DEBT_RATIO = new Metric.Builder(SQALE_DEBT_RATIO_KEY, "Technical Debt Ratio", Metric.ValueType.PERCENT)
- .setDescription("Ratio of the technical debt compared to what it would cost to develop the whole source code from scratch.")
+ .setDescription("Ratio of the actual technical debt compared to the estimated cost to develop the whole source code from scratch")
.setDomain(DOMAIN_MAINTAINABILITY)
.setDirection(Metric.DIRECTION_WORST)
.setOptimizedBestValue(true)
*/
public static final Metric<Long> EFFORT_TO_REACH_MAINTAINABILITY_RATING_A = new Metric.Builder(EFFORT_TO_REACH_MAINTAINABILITY_RATING_A_KEY,
"Effort to Reach Maintainability Rating A", Metric.ValueType.WORK_DUR)
+ .setDescription("Effort to reach maintainability rating A")
.setDomain(DOMAIN_MAINTAINABILITY)
.setDirection(Metric.DIRECTION_WORST)
.setQualitative(true)
*/
public static final Metric<Long> RELIABILITY_REMEDIATION_EFFORT = new Metric.Builder(RELIABILITY_REMEDIATION_EFFORT_KEY, "Reliability Remediation Effort",
Metric.ValueType.WORK_DUR)
+ .setDescription("Reliability Remediation Effort")
.setDomain(DOMAIN_RELIABILITY)
.setDirection(Metric.DIRECTION_WORST)
.setOptimizedBestValue(true)
*/
public static final Metric<Long> NEW_RELIABILITY_REMEDIATION_EFFORT = new Metric.Builder(NEW_RELIABILITY_REMEDIATION_EFFORT_KEY, "Reliability Remediation Effort on New Code",
Metric.ValueType.WORK_DUR)
+ .setDescription("Reliability remediation effort on new code")
.setDomain(DOMAIN_RELIABILITY)
.setDirection(Metric.DIRECTION_WORST)
.setOptimizedBestValue(true)
* @since 5.5
*/
public static final Metric<Integer> RELIABILITY_RATING = new Metric.Builder(RELIABILITY_RATING_KEY, "Reliability Rating", Metric.ValueType.RATING)
+ .setDescription("Reliability rating")
.setDomain(DOMAIN_RELIABILITY)
.setDirection(Metric.DIRECTION_WORST)
.setQualitative(true)
* @since 5.5
*/
public static final Metric<Long> SECURITY_REMEDIATION_EFFORT = new Metric.Builder(SECURITY_REMEDIATION_EFFORT_KEY, "Security Remediation Effort", Metric.ValueType.WORK_DUR)
+ .setDescription("Security remediation effort")
.setDomain(DOMAIN_SECURITY)
.setDirection(Metric.DIRECTION_WORST)
.setOptimizedBestValue(true)
*/
public static final Metric<Long> NEW_SECURITY_REMEDIATION_EFFORT = new Metric.Builder(NEW_SECURITY_REMEDIATION_EFFORT_KEY, "Security Remediation Effort on New Code",
Metric.ValueType.WORK_DUR)
+ .setDescription("Security remediation effort on new code")
.setDomain(DOMAIN_SECURITY)
.setDirection(Metric.DIRECTION_WORST)
.setOptimizedBestValue(true)
* @since 5.5
*/
public static final Metric<Integer> SECURITY_RATING = new Metric.Builder(SECURITY_RATING_KEY, "Security Rating", Metric.ValueType.RATING)
+ .setDescription("Security rating")
.setDomain(DOMAIN_SECURITY)
.setDirection(Metric.DIRECTION_WORST)
.setQualitative(true)
* @since 4.4
*/
public static final Metric<String> QUALITY_GATE_DETAILS = new Metric.Builder(QUALITY_GATE_DETAILS_KEY, "Quality Gate Details", Metric.ValueType.DATA)
- .setDescription("The project detailed status with regard to its quality gate.")
+ .setDescription("The project detailed status with regard to its quality gate")
.setDomain(DOMAIN_GENERAL)
.create();
assertThat(metrics.size()).isGreaterThan(100);
assertThat(metrics).contains(CoreMetrics.NCLOC, CoreMetrics.DIRECTORIES);
}
-
}