]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-8456, SONAR-8906 Cleanup properties
authorJulien HENRY <julien.henry@sonarsource.com>
Tue, 2 May 2017 14:28:58 +0000 (16:28 +0200)
committerJulien HENRY <henryju@yahoo.fr>
Wed, 3 May 2017 06:48:45 +0000 (08:48 +0200)
server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java
sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java
sonar-core/src/main/java/org/sonar/core/config/ExclusionProperties.java
sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java
sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java

index e3040a61be8f233ce34155bae0e6e952cf34c8e3..4dd55fabb199ba6a17c17836c494df8ab4311d54 100644 (file)
@@ -36,10 +36,10 @@ import org.sonar.api.CoreProperties;
 import org.sonar.api.database.DatabaseProperties;
 import org.sonar.api.utils.DateUtils;
 import org.sonar.api.utils.System2;
-import org.sonar.ce.cluster.HazelcastClientWrapperImpl;
-import org.sonar.ce.cluster.HazelcastTestHelper;
 import org.sonar.ce.CeDistributedInformationImpl;
 import org.sonar.ce.StandaloneCeDistributedInformation;
+import org.sonar.ce.cluster.HazelcastClientWrapperImpl;
+import org.sonar.ce.cluster.HazelcastTestHelper;
 import org.sonar.db.DbTester;
 import org.sonar.db.property.PropertyDto;
 import org.sonar.process.NetworkUtils;
@@ -93,10 +93,8 @@ public class ComputeEngineContainerImplTest {
     assertThat(
       picoContainer.getComponentAdapters().stream()
         .map(ComponentAdapter::getComponentImplementation)
-        .collect(Collectors.toList())
-    ).contains((Class) HazelcastClientWrapperImpl.class,
-      (Class) CeDistributedInformationImpl.class
-    );
+        .collect(Collectors.toList())).contains((Class) HazelcastClientWrapperImpl.class,
+          (Class) CeDistributedInformationImpl.class);
     underTest.stop();
   }
 
@@ -139,17 +137,14 @@ public class ComputeEngineContainerImplTest {
         + 23 // level 1
         + 46 // content of DaoModule
         + 3 // content of EsSearchModule
-        + 57 // content of CorePropertyDefinitions
+        + 56 // content of CorePropertyDefinitions
     );
     assertThat(
       picoContainer.getComponentAdapters().stream()
         .map(ComponentAdapter::getComponentImplementation)
-        .collect(Collectors.toList())
-    ).doesNotContain((Class) HazelcastClientWrapperImpl.class,
-      (Class) CeDistributedInformationImpl.class
-    ).contains(
-      (Class) StandaloneCeDistributedInformation.class
-    );
+        .collect(Collectors.toList())).doesNotContain((Class) HazelcastClientWrapperImpl.class,
+          (Class) CeDistributedInformationImpl.class).contains(
+            (Class) StandaloneCeDistributedInformation.class);
     assertThat(picoContainer.getParent().getParent().getParent().getParent()).isNull();
     underTest.stop();
 
index 9578500f9448710f8998c7cd3c8acc439b71ab1a..816a60f212ecc88ed02657250cab2b5857fa9208 100644 (file)
@@ -219,11 +219,11 @@ public class CorePropertyDefinitions {
 
       // CPD
       PropertyDefinition.builder(CoreProperties.CPD_CROSS_PROJECT)
-        .defaultValue(Boolean.toString(CoreProperties.CPD_CROSS_PROJECT_DEFAULT_VALUE))
+        .defaultValue(Boolean.toString(false))
         .name("Cross project duplication detection")
-        .description("By default, SonarQube detects duplications at sub-project level. This means that a block "
-          + "duplicated on two sub-projects of the same project won't be reported. Setting this parameter to \"true\" "
-          + "allows to detect duplicates across sub-projects and more generally across projects. Note that activating "
+        .description("By default, SonarQube detects duplications at project level. This means that a block "
+          + "duplicated on two different projects won't be reported. Setting this parameter to \"true\" "
+          + "allows to detect duplicates across projects. Note that activating "
           + "this property will slightly increase each SonarQube analysis time.")
         .onQualifiers(Qualifiers.PROJECT)
         .category(CoreProperties.CATEGORY_GENERAL)
index e8598c455e824bb5916d56195cdecb08a9a8a278..ceb50a4c0e7a52b564e71d4b05e01dfd8cebe83d 100644 (file)
@@ -45,17 +45,6 @@ public class ExclusionProperties {
         .build(),
 
       // FILES
-      PropertyDefinition.builder(CoreProperties.IMPORT_UNKNOWN_FILES_KEY)
-        .name("Import unknown files")
-        .description("If set to true, all files are imported - with respect to inclusions and exclusions, even if there is no matching language plugin installed.")
-        .type(PropertyType.BOOLEAN)
-        .defaultValue("false")
-        .category(CoreProperties.CATEGORY_EXCLUSIONS)
-        .subCategory(CoreProperties.SUBCATEGORY_FILES_EXCLUSIONS)
-        .onQualifiers(Qualifiers.PROJECT)
-        .index(-1)
-        .build(),
-
       PropertyDefinition.builder(CoreProperties.GLOBAL_EXCLUSIONS_PROPERTY)
         .name("Global Source File Exclusions")
         .multiValues(true)
index 0d1e7f05b9f288425e9b1a161d25c3d2f257b92c..6706eda9399692da5291894618e9e8277bb7d455 100644 (file)
@@ -33,7 +33,7 @@ public class CorePropertyDefinitionsTest {
   @Test
   public void all() {
     List<PropertyDefinition> defs = CorePropertyDefinitions.all();
-    assertThat(defs).hasSize(57);
+    assertThat(defs).hasSize(56);
   }
 
   @Test
index f5753d6488b55a0ba4c41b2719caf514421202ad..1ab9759bb8899a0a64fe57d99ad69fd78b4ba74d 100644 (file)
@@ -204,7 +204,7 @@ public interface CoreProperties {
    */
   @Deprecated
   String CORE_DEFAULT_GROUP_DEFAULT_VALUE = "sonar-users";
-  
+
   boolean CORE_ALLOW_USERS_TO_SIGNUP_DEAULT_VALUE = false;
 
   /**
@@ -256,47 +256,16 @@ public interface CoreProperties {
   @Deprecated
   String SERVER_BASE_URL_DEFAULT_VALUE = "http://localhost:9000";
 
-  /* CPD */
-  String CPD_PLUGIN = "cpd";
-
   /**
    * @since 2.11
    */
   String CPD_CROSS_PROJECT = "sonar.cpd.cross_project";
 
-  /**
-   * @see #CPD_CROSS_PROJECT
-   * @since 2.11
-   */
-  boolean CPD_CROSS_PROJECT_DEFAULT_VALUE = false;
-
   /**
    * @since 3.5
    */
   String CPD_EXCLUSIONS = "sonar.cpd.exclusions";
 
-  /* Design */
-
-  /**
-   * Indicates whether Java bytecode analysis should be skipped.
-   *
-   * @since 2.0
-   */
-  String DESIGN_SKIP_DESIGN_PROPERTY = "sonar.skipDesign";
-  boolean DESIGN_SKIP_DESIGN_DEFAULT_VALUE = false;
-
-  /**
-   * Indicates whether Package Design Analysis should be skipped.
-   *
-   * @since 2.9
-   */
-  String DESIGN_SKIP_PACKAGE_DESIGN_PROPERTY = "sonar.skipPackageDesign";
-  boolean DESIGN_SKIP_PACKAGE_DESIGN_DEFAULT_VALUE = false;
-
-  /* Google Analytics */
-  String GOOGLE_ANALYTICS_PLUGIN = "google-analytics";
-  String GOOGLE_ANALYTICS_ACCOUNT_PROPERTY = "sonar.google-analytics.account";
-
   /**
    * @since 2.11
    */