Browse Source

SONAR-4660 Make Settings > 'Database Cleaner', 'Differential Views', 'Duplications', 'Localization' and 'Security' pages, some sub-categories of the 'General' page

tags/4.0
Julien Lancelot 10 years ago
parent
commit
62723fc746

+ 64
- 175
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/CorePlugin.java View File

@@ -19,104 +19,35 @@
*/
package org.sonar.plugins.core;

import org.sonar.api.resources.Qualifiers;
import org.sonar.api.config.PropertyDefinition;
import com.google.common.collect.ImmutableList;
import org.sonar.api.CoreProperties;
import org.sonar.api.Properties;
import org.sonar.api.Property;
import org.sonar.api.PropertyType;
import org.sonar.api.SonarPlugin;
import org.sonar.api.*;
import org.sonar.api.checks.NoSonarFilter;
import org.sonar.api.config.PropertyDefinition;
import org.sonar.api.resources.Java;
import org.sonar.api.resources.Qualifiers;
import org.sonar.batch.components.PastSnapshotFinder;
import org.sonar.core.timemachine.Periods;
import org.sonar.plugins.core.batch.IndexProjectPostJob;
import org.sonar.plugins.core.charts.DistributionAreaChart;
import org.sonar.plugins.core.charts.DistributionBarChart;
import org.sonar.plugins.core.charts.XradarChart;
import org.sonar.plugins.core.colorizers.JavaColorizerFormat;
import org.sonar.plugins.core.dashboards.GlobalDefaultDashboard;
import org.sonar.plugins.core.dashboards.ProjectDefaultDashboard;
import org.sonar.plugins.core.dashboards.ProjectHotspotDashboard;
import org.sonar.plugins.core.dashboards.ProjectIssuesDashboard;
import org.sonar.plugins.core.dashboards.ProjectTimeMachineDashboard;
import org.sonar.plugins.core.issue.CountFalsePositivesDecorator;
import org.sonar.plugins.core.issue.CountUnresolvedIssuesDecorator;
import org.sonar.plugins.core.issue.InitialOpenIssuesSensor;
import org.sonar.plugins.core.issue.InitialOpenIssuesStack;
import org.sonar.plugins.core.issue.IssueHandlers;
import org.sonar.plugins.core.issue.IssueTracking;
import org.sonar.plugins.core.issue.IssueTrackingDecorator;
import org.sonar.plugins.core.issue.IssuesDensityDecorator;
import org.sonar.plugins.core.issue.WeightedIssuesDecorator;
import org.sonar.plugins.core.dashboards.*;
import org.sonar.plugins.core.issue.*;
import org.sonar.plugins.core.issue.ignore.IgnoreIssuesPlugin;
import org.sonar.plugins.core.issue.notification.ChangesOnMyIssueNotificationDispatcher;
import org.sonar.plugins.core.issue.notification.IssueChangesEmailTemplate;
import org.sonar.plugins.core.issue.notification.NewFalsePositiveNotificationDispatcher;
import org.sonar.plugins.core.issue.notification.NewIssuesEmailTemplate;
import org.sonar.plugins.core.issue.notification.NewIssuesNotificationDispatcher;
import org.sonar.plugins.core.issue.notification.SendIssueNotificationsPostJob;
import org.sonar.plugins.core.issue.notification.*;
import org.sonar.plugins.core.measurefilters.MyFavouritesFilter;
import org.sonar.plugins.core.measurefilters.ProjectFilter;
import org.sonar.plugins.core.notifications.alerts.NewAlerts;
import org.sonar.plugins.core.security.ApplyProjectRolesDecorator;
import org.sonar.plugins.core.sensors.BranchCoverageDecorator;
import org.sonar.plugins.core.sensors.CheckAlertThresholds;
import org.sonar.plugins.core.sensors.CommentDensityDecorator;
import org.sonar.plugins.core.sensors.CoverageDecorator;
import org.sonar.plugins.core.sensors.CoverageMeasurementFilter;
import org.sonar.plugins.core.sensors.DirectoriesDecorator;
import org.sonar.plugins.core.sensors.FilesDecorator;
import org.sonar.plugins.core.sensors.GenerateAlertEvents;
import org.sonar.plugins.core.sensors.ItBranchCoverageDecorator;
import org.sonar.plugins.core.sensors.ItCoverageDecorator;
import org.sonar.plugins.core.sensors.ItLineCoverageDecorator;
import org.sonar.plugins.core.sensors.LineCoverageDecorator;
import org.sonar.plugins.core.sensors.ManualMeasureDecorator;
import org.sonar.plugins.core.sensors.OverallBranchCoverageDecorator;
import org.sonar.plugins.core.sensors.OverallCoverageDecorator;
import org.sonar.plugins.core.sensors.OverallLineCoverageDecorator;
import org.sonar.plugins.core.sensors.ProfileEventsSensor;
import org.sonar.plugins.core.sensors.ProfileSensor;
import org.sonar.plugins.core.sensors.ProjectLinksSensor;
import org.sonar.plugins.core.sensors.UnitTestDecorator;
import org.sonar.plugins.core.sensors.VersionEventsSensor;
import org.sonar.plugins.core.timemachine.NewCoverageAggregator;
import org.sonar.plugins.core.timemachine.NewCoverageFileAnalyzer;
import org.sonar.plugins.core.timemachine.NewItCoverageFileAnalyzer;
import org.sonar.plugins.core.timemachine.NewOverallCoverageFileAnalyzer;
import org.sonar.plugins.core.timemachine.TendencyDecorator;
import org.sonar.plugins.core.timemachine.TimeMachineConfigurationPersister;
import org.sonar.plugins.core.timemachine.VariationDecorator;
import org.sonar.plugins.core.sensors.*;
import org.sonar.plugins.core.timemachine.*;
import org.sonar.plugins.core.web.Lcom4Viewer;
import org.sonar.plugins.core.web.TestsViewer;
import org.sonar.plugins.core.widgets.AlertsWidget;
import org.sonar.plugins.core.widgets.ComplexityWidget;
import org.sonar.plugins.core.widgets.CoverageWidget;
import org.sonar.plugins.core.widgets.CustomMeasuresWidget;
import org.sonar.plugins.core.widgets.DescriptionWidget;
import org.sonar.plugins.core.widgets.DocumentationCommentsWidget;
import org.sonar.plugins.core.widgets.DuplicationsWidget;
import org.sonar.plugins.core.widgets.EventsWidget;
import org.sonar.plugins.core.widgets.HotspotMetricWidget;
import org.sonar.plugins.core.widgets.HotspotMostViolatedResourcesWidget;
import org.sonar.plugins.core.widgets.HotspotMostViolatedRulesWidget;
import org.sonar.plugins.core.widgets.ItCoverageWidget;
import org.sonar.plugins.core.widgets.MeasureFilterListWidget;
import org.sonar.plugins.core.widgets.MeasureFilterTreemapWidget;
import org.sonar.plugins.core.widgets.RulesWidget;
import org.sonar.plugins.core.widgets.SizeWidget;
import org.sonar.plugins.core.widgets.TimeMachineWidget;
import org.sonar.plugins.core.widgets.TimelineWidget;
import org.sonar.plugins.core.widgets.TreemapWidget;
import org.sonar.plugins.core.widgets.WelcomeWidget;
import org.sonar.plugins.core.widgets.issues.ActionPlansWidget;
import org.sonar.plugins.core.widgets.issues.FalsePositiveIssuesWidget;
import org.sonar.plugins.core.widgets.issues.IssueFilterWidget;
import org.sonar.plugins.core.widgets.issues.MyUnresolvedIssuesWidget;
import org.sonar.plugins.core.widgets.issues.UnresolvedIssuesPerAssigneeWidget;
import org.sonar.plugins.core.widgets.issues.UnresolvedIssuesStatusesWidget;
import org.sonar.plugins.core.widgets.*;
import org.sonar.plugins.core.widgets.issues.*;

import java.util.Arrays;
import java.util.List;

@Properties({
@@ -183,100 +114,6 @@ import java.util.List;
project = false,
global = true,
category = CoreProperties.CATEGORY_GENERAL),
@Property(
key = CoreProperties.CORE_IMPORT_SOURCES_PROPERTY,
defaultValue = "" + CoreProperties.CORE_IMPORT_SOURCES_DEFAULT_VALUE,
name = "Import sources",
description = "Set to false if sources should not be imported and therefore not available in the Web UI (e.g. for security reasons).",
project = true,
module = true,
global = true,
category = CoreProperties.CATEGORY_SECURITY,
type = PropertyType.BOOLEAN),
@Property(
key = CoreProperties.CORE_FORCE_AUTHENTICATION_PROPERTY,
defaultValue = "" + CoreProperties.CORE_FORCE_AUTHENTICATION_DEFAULT_VALUE,
name = "Force user authentication",
description = "Forcing user authentication stops un-logged users to access SonarQube.",
project = false,
global = true,
category = CoreProperties.CATEGORY_SECURITY,
type = PropertyType.BOOLEAN),
@Property(
key = CoreProperties.CORE_ALLOW_USERS_TO_SIGNUP_PROPERTY,
defaultValue = "" + CoreProperties.CORE_ALLOW_USERS_TO_SIGNUP_DEAULT_VALUE,
name = "Allow users to sign up online",
description = "Users can sign up online.",
project = false,
global = true,
category = CoreProperties.CATEGORY_SECURITY,
type = PropertyType.BOOLEAN),
@Property(
key = CoreProperties.CORE_DEFAULT_GROUP,
defaultValue = CoreProperties.CORE_DEFAULT_GROUP_DEFAULT_VALUE,
name = "Default user group",
description = "Any new users will automatically join this group.",
project = false,
global = true,
category = CoreProperties.CATEGORY_SECURITY),
@Property(
key = CoreProperties.CORE_VIOLATION_LOCALE_PROPERTY,
defaultValue = "en",
name = "Locale used for violation messages",
description = "Locale to be used when generating violation messages. It's up to each rule engine to support this global internationalization property",
project = true,
global = true,
category = CoreProperties.CATEGORY_L10N),
@Property(
key = "sonar.timemachine.period1",
name = "Period 1",
description = "Period used to compare measures and track new violations. Values are : <ul class='bullet'><li>Number of days before " +
"analysis, for example 5.</li><li>A custom date. Format is yyyy-MM-dd, for example 2010-12-25</li><li>'previous_analysis' to " +
"compare to previous analysis</li><li>'previous_version' to compare to the previous version in the project history</li></ul>" +
"<p>When specifying a number of days or a date, the snapshot selected for comparison is " +
" the first one available inside the corresponding time range. </p>" +
"<p>Changing this property only takes effect after subsequent project inspections.<p/>",
project = false,
global = true,
defaultValue = CoreProperties.TIMEMACHINE_DEFAULT_PERIOD_1,
category = CoreProperties.CATEGORY_DIFFERENTIAL_VIEWS),
@Property(
key = "sonar.timemachine.period2",
name = "Period 2",
description = "See the property 'Period 1'",
project = false,
global = true,
defaultValue = CoreProperties.TIMEMACHINE_DEFAULT_PERIOD_2,
category = CoreProperties.CATEGORY_DIFFERENTIAL_VIEWS),
@Property(
key = "sonar.timemachine.period3",
name = "Period 3",
description = "See the property 'Period 1'",
project = false,
global = true,
defaultValue = CoreProperties.TIMEMACHINE_DEFAULT_PERIOD_3,
category = CoreProperties.CATEGORY_DIFFERENTIAL_VIEWS),
@Property(
key = "sonar.timemachine.period4",
name = "Period 4",
description = "Period used to compare measures and track new violations. This property is specific to the project. Values are : " +
"<ul class='bullet'><li>Number of days before analysis, for example 5.</li><li>A custom date. Format is yyyy-MM-dd, " +
"for example 2010-12-25</li><li>'previous_analysis' to compare to previous analysis</li>" +
"<li>'previous_version' to compare to the previous version in the project history</li><li>A version, for example 1.2</li></ul>" +
"<p>When specifying a number of days or a date, the snapshot selected for comparison is the first one available inside the corresponding time range. </p>" +
"<p>Changing this property only takes effect after subsequent project inspections.<p/>",
project = true,
global = false,
defaultValue = CoreProperties.TIMEMACHINE_DEFAULT_PERIOD_4,
category = CoreProperties.CATEGORY_DIFFERENTIAL_VIEWS),
@Property(
key = "sonar.timemachine.period5",
name = "Period 5",
description = "See the property 'Period 4'",
project = true,
global = false,
defaultValue = CoreProperties.TIMEMACHINE_DEFAULT_PERIOD_5,
category = CoreProperties.CATEGORY_DIFFERENTIAL_VIEWS),
@Property(
key = CoreProperties.DRY_RUN,
defaultValue = "false",
@@ -488,8 +325,60 @@ public final class CorePlugin extends SonarPlugin {
extensions.addAll(ExclusionProperties.definitions());
extensions.addAll(IgnoreIssuesPlugin.getExtensions());
extensions.addAll(CoverageMeasurementFilter.getPropertyDefinitions());
extensions.addAll(PastSnapshotFinder.getPropertyDefinitions());
extensions.addAll(propertyDefinitions());

return extensions.build();
}


static List<PropertyDefinition> propertyDefinitions() {
return Arrays.asList(
PropertyDefinition.builder(CoreProperties.CORE_VIOLATION_LOCALE_PROPERTY)
.defaultValue("en")
.name("Locale used for issue messages")
.description("Locale to be used when generating issue messages. It's up to each rule engine to support this global internationalization property")
.onQualifiers(Qualifiers.PROJECT)
.category(CoreProperties.CATEGORY_GENERAL)
.subCategory(CoreProperties.SUBCATEGORY_L10N)
.build(),

PropertyDefinition.builder(CoreProperties.CORE_ALLOW_USERS_TO_SIGNUP_PROPERTY)
.defaultValue("" + CoreProperties.CORE_ALLOW_USERS_TO_SIGNUP_DEAULT_VALUE)
.name("Allow users to sign up online")
.description("Users can sign up online.")
.type(PropertyType.BOOLEAN)
.category(CoreProperties.CATEGORY_GENERAL)
.subCategory(CoreProperties.SUBCATEGORY_SECURITY)
.build(),

PropertyDefinition.builder(CoreProperties.CORE_DEFAULT_GROUP)
.defaultValue(CoreProperties.CORE_DEFAULT_GROUP_DEFAULT_VALUE)
.name("Default user group")
.description("Any new users will automatically join this group.")
.category(CoreProperties.CATEGORY_GENERAL)
.subCategory(CoreProperties.SUBCATEGORY_SECURITY)
.build(),

PropertyDefinition.builder(CoreProperties.CORE_IMPORT_SOURCES_PROPERTY)
.defaultValue("" + CoreProperties.CORE_IMPORT_SOURCES_DEFAULT_VALUE)
.name("Import sources")
.description("Set to false if sources should not be imported and therefore not available in the Web UI (e.g. for security reasons).")
.type(PropertyType.BOOLEAN)
.onQualifiers(Qualifiers.PROJECT, Qualifiers.MODULE)
.category(CoreProperties.CATEGORY_GENERAL)
.subCategory(CoreProperties.SUBCATEGORY_SECURITY)
.build(),

PropertyDefinition.builder(CoreProperties.CORE_FORCE_AUTHENTICATION_PROPERTY)
.defaultValue("" + CoreProperties.CORE_FORCE_AUTHENTICATION_DEFAULT_VALUE)
.name("Force user authentication")
.description("Forcing user authentication stops un-logged users to access SonarQube.")
.type(PropertyType.BOOLEAN)
.category(CoreProperties.CATEGORY_GENERAL)
.subCategory(CoreProperties.SUBCATEGORY_SECURITY)
.build()
);
}

}

+ 5
- 0
plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties View File

@@ -703,6 +703,11 @@ settings.save_category=Save {0} Settings
property.category.email=Email
property.category.encryption=Encryption
property.category.general=General
property.category.general.security=Security
property.category.general.duplications=Duplications
property.category.general.differentialViews=Differential Views
property.category.general.localization=Localization
property.category.general.databaseCleaner=Database Cleaner
property.category.security=Security
property.category.java=Java
property.category.differentialViews=Differential Views

+ 4
- 2
plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/CpdPlugin.java View File

@@ -40,7 +40,8 @@ public final class CpdPlugin extends SonarPlugin {
.name("Cross project duplication detection")
.description("SonarQube supports the detection of cross project duplications. Activating this property will slightly increase each SonarQube analysis time.")
.onQualifiers(Qualifiers.PROJECT, Qualifiers.MODULE)
.category(CoreProperties.CATEGORY_DUPLICATIONS)
.category(CoreProperties.CATEGORY_GENERAL)
.subCategory(CoreProperties.SUBCATEGORY_DUPLICATIONS)
.type(PropertyType.BOOLEAN)
.build(),
PropertyDefinition.builder(CoreProperties.CPD_SKIP_PROPERTY)
@@ -48,7 +49,8 @@ public final class CpdPlugin extends SonarPlugin {
.name("Skip")
.description("Disable detection of duplications")
.hidden()
.category(CoreProperties.CATEGORY_DUPLICATIONS)
.category(CoreProperties.CATEGORY_GENERAL)
.subCategory(CoreProperties.SUBCATEGORY_DUPLICATIONS)
.type(PropertyType.BOOLEAN)
.build(),
PropertyDefinition.builder(CoreProperties.CPD_EXCLUSIONS)

+ 13
- 0
plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/DbCleanerPlugin.java View File

@@ -20,6 +20,7 @@
package org.sonar.plugins.dbcleaner;

import com.google.common.collect.ImmutableList;
import org.sonar.api.CoreProperties;
import org.sonar.api.PropertyType;
import org.sonar.api.SonarPlugin;
import org.sonar.api.config.PropertyDefinition;
@@ -45,6 +46,8 @@ public final class DbCleanerPlugin extends SonarPlugin {
.description("If set to true, no history is kept at directory/package level. Setting this to false can cause database bloat.")
.type(PropertyType.BOOLEAN)
.onQualifiers(Qualifiers.PROJECT)
.category(CoreProperties.CATEGORY_GENERAL)
.subCategory(CoreProperties.SUBCATEGORY_DATABASE_CLEANER)
.index(1)
.build(),

@@ -54,6 +57,8 @@ public final class DbCleanerPlugin extends SonarPlugin {
.description("Issues that have been closed for more than this number of days will be deleted.")
.type(PropertyType.INTEGER)
.onQualifiers(Qualifiers.PROJECT)
.category(CoreProperties.CATEGORY_GENERAL)
.subCategory(CoreProperties.SUBCATEGORY_DATABASE_CLEANER)
.index(2)
.build(),

@@ -64,6 +69,8 @@ public final class DbCleanerPlugin extends SonarPlugin {
+ "the DbCleaner keeps the most recent one and fully deletes the other ones.")
.type(PropertyType.INTEGER)
.onQualifiers(Qualifiers.PROJECT)
.category(CoreProperties.CATEGORY_GENERAL)
.subCategory(CoreProperties.SUBCATEGORY_DATABASE_CLEANER)
.index(3)
.build(),

@@ -74,6 +81,8 @@ public final class DbCleanerPlugin extends SonarPlugin {
+ "the DbCleaner keeps the most recent one and fully deletes the other ones")
.type(PropertyType.INTEGER)
.onQualifiers(Qualifiers.PROJECT)
.category(CoreProperties.CATEGORY_GENERAL)
.subCategory(CoreProperties.SUBCATEGORY_DATABASE_CLEANER)
.index(4)
.build(),

@@ -84,6 +93,8 @@ public final class DbCleanerPlugin extends SonarPlugin {
+ "the DbCleaner keeps the most recent one and fully deletes the other ones.")
.type(PropertyType.INTEGER)
.onQualifiers(Qualifiers.PROJECT)
.category(CoreProperties.CATEGORY_GENERAL)
.subCategory(CoreProperties.SUBCATEGORY_DATABASE_CLEANER)
.index(5)
.build(),

@@ -93,6 +104,8 @@ public final class DbCleanerPlugin extends SonarPlugin {
.description("After this number of weeks, all snapshots are fully deleted.")
.type(PropertyType.INTEGER)
.onQualifiers(Qualifiers.PROJECT)
.category(CoreProperties.CATEGORY_GENERAL)
.subCategory(CoreProperties.SUBCATEGORY_DATABASE_CLEANER)
.index(6)
.build()
);

+ 62
- 2
sonar-batch/src/main/java/org/sonar/batch/components/PastSnapshotFinder.java View File

@@ -20,18 +20,22 @@
package org.sonar.batch.components;

import com.google.common.base.Strings;
import com.google.common.collect.ImmutableList;
import org.apache.commons.configuration.Configuration;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.sonar.api.BatchExtension;
import org.sonar.api.CoreProperties;
import org.sonar.api.config.PropertyDefinition;
import org.sonar.api.config.Settings;
import org.sonar.api.database.model.Snapshot;
import org.sonar.api.resources.Qualifiers;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

public class PastSnapshotFinder implements BatchExtension {

@@ -44,8 +48,8 @@ public class PastSnapshotFinder implements BatchExtension {
private PastSnapshotFinderByPreviousVersion finderByPreviousVersion;

public PastSnapshotFinder(PastSnapshotFinderByDays finderByDays, PastSnapshotFinderByVersion finderByVersion,
PastSnapshotFinderByDate finderByDate, PastSnapshotFinderByPreviousAnalysis finderByPreviousAnalysis,
PastSnapshotFinderByPreviousVersion finderByPreviousVersion) {
PastSnapshotFinderByDate finderByDate, PastSnapshotFinderByPreviousAnalysis finderByPreviousAnalysis,
PastSnapshotFinderByPreviousVersion finderByPreviousVersion) {
this.finderByDays = finderByDays;
this.finderByVersion = finderByVersion;
this.finderByDate = finderByDate;
@@ -185,4 +189,60 @@ public class PastSnapshotFinder implements BatchExtension {
}
}

public static List<? extends PropertyDefinition> getPropertyDefinitions() {
return ImmutableList.of(
PropertyDefinition.builder(CoreProperties.TIMEMACHINE_PERIOD_PREFIX + 1)
.name("Period 1")
.description("Period used to compare measures and track new violations. Values are : <ul class='bullet'><li>Number of days before " +
"analysis, for example 5.</li><li>A custom date. Format is yyyy-MM-dd, for example 2010-12-25</li><li>'previous_analysis' to " +
"compare to previous analysis</li><li>'previous_version' to compare to the previous version in the project history</li></ul>" +
"<p>When specifying a number of days or a date, the snapshot selected for comparison is " +
" the first one available inside the corresponding time range. </p>" +
"<p>Changing this property only takes effect after subsequent project inspections.<p/>")
.defaultValue(CoreProperties.TIMEMACHINE_DEFAULT_PERIOD_1)
.category(CoreProperties.CATEGORY_GENERAL)
.subCategory(CoreProperties.SUBCATEGORY_DIFFERENTIAL_VIEWS)
.build(),

PropertyDefinition.builder(CoreProperties.TIMEMACHINE_PERIOD_PREFIX + 2)
.name("Period 2")
.description("See the property 'Period 1'")
.defaultValue(CoreProperties.TIMEMACHINE_DEFAULT_PERIOD_2)
.category(CoreProperties.CATEGORY_GENERAL)
.subCategory(CoreProperties.SUBCATEGORY_DIFFERENTIAL_VIEWS)
.build(),

PropertyDefinition.builder(CoreProperties.TIMEMACHINE_PERIOD_PREFIX + 3)
.name("Period 3")
.description("See the property 'Period 1'")
.defaultValue(CoreProperties.TIMEMACHINE_DEFAULT_PERIOD_3)
.category(CoreProperties.CATEGORY_GENERAL)
.subCategory(CoreProperties.SUBCATEGORY_DIFFERENTIAL_VIEWS)
.build(),

PropertyDefinition.builder(CoreProperties.TIMEMACHINE_PERIOD_PREFIX + 4)
.name("Period 4")
.description("Period used to compare measures and track new violations. This property is specific to the project. Values are : " +
"<ul class='bullet'><li>Number of days before analysis, for example 5.</li><li>A custom date. Format is yyyy-MM-dd, " +
"for example 2010-12-25</li><li>'previous_analysis' to compare to previous analysis</li>" +
"<li>'previous_version' to compare to the previous version in the project history</li><li>A version, for example 1.2</li></ul>" +
"<p>When specifying a number of days or a date, the snapshot selected for comparison is the first one available inside the corresponding time range. </p>" +
"<p>Changing this property only takes effect after subsequent project inspections.<p/>")
.defaultValue(CoreProperties.TIMEMACHINE_DEFAULT_PERIOD_4)
.onlyOnQualifiers(Qualifiers.PROJECT)
.category(CoreProperties.CATEGORY_GENERAL)
.subCategory(CoreProperties.SUBCATEGORY_DIFFERENTIAL_VIEWS)
.build(),

PropertyDefinition.builder(CoreProperties.TIMEMACHINE_PERIOD_PREFIX + 5)
.name("Period 5")
.description("See the property 'Period 4'")
.defaultValue(CoreProperties.TIMEMACHINE_DEFAULT_PERIOD_5)
.onlyOnQualifiers(Qualifiers.PROJECT)
.category(CoreProperties.CATEGORY_GENERAL)
.subCategory(CoreProperties.SUBCATEGORY_DIFFERENTIAL_VIEWS)
.build()
);
}

}

+ 45
- 0
sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java View File

@@ -37,6 +37,31 @@ public interface CoreProperties {
*/
String CATEGORY_GENERAL = "general";

/**
* @since 4.0
*/
String SUBCATEGORY_DATABASE_CLEANER = "databaseCleaner";

/**
* @since 4.0
*/
String SUBCATEGORY_DUPLICATIONS = "duplications";

/**
* @since 4.0
*/
String SUBCATEGORY_DIFFERENTIAL_VIEWS = "differentialViews";

/**
*@since 4.0
*/
String SUBCATEGORY_SECURITY = "security";

/**
*@since 4.0
*/
String SUBCATEGORY_L10N = "localization";

/**
* @since 2.11
*/
@@ -44,17 +69,26 @@ public interface CoreProperties {

/**
* @since 2.11
* @deprecated since 4.0. See http://jira.codehaus.org/browse/SONAR-4660. Do not forget to remove the properties from core bundles
* @see #SUBCATEGORY_DUPLICATIONS
*/
@Deprecated
String CATEGORY_DUPLICATIONS = "duplications";

/**
* @since 2.11
* @deprecated since 4.0. See http://jira.codehaus.org/browse/SONAR-4660. Do not forget to remove the properties from core bundles
* @see #SUBCATEGORY_SECURITY
*/
@Deprecated
String CATEGORY_SECURITY = "security";

/**
* @since 2.11
* @deprecated since 4.0. See http://jira.codehaus.org/browse/SONAR-4660. Do not forget to remove the properties from core bundles
* @see #SUBCATEGORY_L10N
*/
@Deprecated
String CATEGORY_L10N = "localization";

/**
@@ -64,7 +98,10 @@ public interface CoreProperties {

/**
* @since 2.11
* @deprecated since 4.0. See http://jira.codehaus.org/browse/SONAR-4660. Do not forget to remove the properties from core bundles
* @see #SUBCATEGORY_DIFFERENTIAL_VIEWS
*/
@Deprecated
String CATEGORY_DIFFERENTIAL_VIEWS = "differentialViews";

/**
@@ -76,7 +113,15 @@ public interface CoreProperties {
* @since 4.0
*/
String SUBCATEGORY_FILES_EXCLUSIONS = "files";

/**
* @since 4.0
*/
String SUBCATEGORY_DUPLICATIONS_EXCLUSIONS = "duplications";

/**
* @since 4.0
*/
String SUBCATEGORY_COVERAGE_EXCLUSIONS = "coverage";

/**

Loading…
Cancel
Save