Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 13.0
* Remove deprecated complexity metrics:
* `org.sonar.api.measures.CoreMetrics.FILE_COMPLEXITY`.
* `org.sonar.api.measures.CoreMetrics.COMPLEXITY_IN_CLASSES`.
* `org.sonar.api.measures.CoreMetrics.CLASS_COMPLEXITY`.
* `org.sonar.api.measures.CoreMetrics.COMPLEXITY_IN_FUNCTIONS`.
* `org.sonar.api.measures.CoreMetrics.FUNCTION_COMPLEXITY`.
* `org.sonar.api.measures.CoreMetrics.FUNCTION_COMPLEXITY_DISTRIBUTION`.
* `org.sonar.api.measures.CoreMetrics.FILE_COMPLEXITY_DISTRIBUTION`.

## 12.0
* Introduced support for hidden file analysis:
* Introduce `org.sonar.api.batch.fs.IndexedFile.isHidden`.
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
group=org.sonarsource.api.plugin
version=12.1-SNAPSHOT
version=13.0-SNAPSHOT
description=Plugin API for SonarQube, SonarCloud and SonarLint
org.gradle.jvmargs=-Xmx2048m
136 changes: 0 additions & 136 deletions plugin-api/src/main/java/org/sonar/api/measures/CoreMetrics.java
Original file line number Diff line number Diff line change
Expand Up @@ -293,142 +293,6 @@ public final class CoreMetrics {
.setDomain(DOMAIN_COMPLEXITY)
.create();

/**
* @deprecated since 6.7
*/
@Deprecated
public static final String FILE_COMPLEXITY_KEY = "file_complexity";
/**
* Information about the cyclomatic complexity per file, calculated by divided the {@link #COMPLEXITY} by the number of {@link #FILES}.
*
* @deprecated since 6.7
*/
@Deprecated
public static final Metric<Double> FILE_COMPLEXITY = new Metric.Builder(FILE_COMPLEXITY_KEY, "Complexity / File", Metric.ValueType.FLOAT)
.setDescription("Complexity average by file")
.setDirection(Metric.DIRECTION_WORST)
.setQualitative(true)
.setDomain(DOMAIN_COMPLEXITY)
.setHidden(true)
.create();

/**
* @since 3.6
* @deprecated since 6.7
*/
@Deprecated
public static final String COMPLEXITY_IN_CLASSES_KEY = "complexity_in_classes";

/**
* @since 3.6
* @deprecated since 6.7
*/
@Deprecated
public static final Metric<Integer> COMPLEXITY_IN_CLASSES = new Metric.Builder(COMPLEXITY_IN_CLASSES_KEY, "Complexity in Classes", Metric.ValueType.INT)
.setDescription("Cyclomatic complexity in classes")
.setHidden(true)
.setDirection(Metric.DIRECTION_WORST)
.setQualitative(false)
.setDomain(DOMAIN_COMPLEXITY)
.setDeleteHistoricalData(true)
.setHidden(true)
.create();

/**
* @deprecated since 6.7
*/
@Deprecated
public static final String CLASS_COMPLEXITY_KEY = "class_complexity";
/**
* Information about the cyclomatic complexity per class, calculated by divided the {@link #COMPLEXITY_IN_CLASSES} by the number of {@link #CLASSES}.
*
* @deprecated since 6.7
*/
@Deprecated
public static final Metric<Double> CLASS_COMPLEXITY = new Metric.Builder(CLASS_COMPLEXITY_KEY, "Complexity / Class", Metric.ValueType.FLOAT)
.setDescription("Complexity average by class")
.setDirection(Metric.DIRECTION_WORST)
.setQualitative(true)
.setDomain(DOMAIN_COMPLEXITY)
.setHidden(true)
.create();

/**
* @since 3.6
* @deprecated since 6.7
*/
@Deprecated
public static final String COMPLEXITY_IN_FUNCTIONS_KEY = "complexity_in_functions";
/**
* @since 3.6
* @deprecated since 6.7
*/
@Deprecated
public static final Metric<Integer> COMPLEXITY_IN_FUNCTIONS = new Metric.Builder(COMPLEXITY_IN_FUNCTIONS_KEY, "Complexity in Functions", Metric.ValueType.INT)
.setDescription("Cyclomatic complexity in functions")
.setHidden(true)
.setDirection(Metric.DIRECTION_WORST)
.setQualitative(false)
.setDomain(DOMAIN_COMPLEXITY)
.setDeleteHistoricalData(true)
.setHidden(true)
.create();

/**
* @deprecated since 6.7
*/
@Deprecated
public static final String FUNCTION_COMPLEXITY_KEY = "function_complexity";
/**
* Information about the cyclomatic complexity per function, calculated by divided the {@link #COMPLEXITY_IN_FUNCTIONS} by the number of {@link #FUNCTIONS}.
*
* @deprecated since 6.7
*/
@Deprecated
public static final Metric<Double> FUNCTION_COMPLEXITY = new Metric.Builder(FUNCTION_COMPLEXITY_KEY, "Complexity / Function", Metric.ValueType.FLOAT)
.setDescription("Complexity average by function")
.setDirection(Metric.DIRECTION_WORST)
.setQualitative(true)
.setDomain(DOMAIN_COMPLEXITY)
.setHidden(true)
.create();

/**
* @deprecated since 6.7
*/
@Deprecated
public static final String FUNCTION_COMPLEXITY_DISTRIBUTION_KEY = "function_complexity_distribution";
/**
* @deprecated since 6.7
*/
@Deprecated
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)
.setQualitative(true)
.setDomain(DOMAIN_COMPLEXITY)
.setHidden(true)
.create();

/**
* @deprecated since 6.7
*/
@Deprecated
public static final String FILE_COMPLEXITY_DISTRIBUTION_KEY = "file_complexity_distribution";
/**
* @deprecated since 6.7
*/
@Deprecated
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)
.setQualitative(true)
.setDomain(DOMAIN_COMPLEXITY)
.setHidden(true)
.create();

public static final String COGNITIVE_COMPLEXITY_KEY = "cognitive_complexity";
public static final Metric<Integer> COGNITIVE_COMPLEXITY = new Metric.Builder(COGNITIVE_COMPLEXITY_KEY, "Cognitive Complexity", Metric.ValueType.INT)
.setDescription("Cognitive complexity")
Expand Down