diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2017-02-13 11:36:36 +0100 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2017-02-13 11:36:36 +0100 |
commit | ad57a55ea39e3c012edf6ea57db88c0b813f5ae9 (patch) | |
tree | da3f57bc298a37cf931f50cef1d9eef22d516452 /sonar-plugin-api | |
parent | 02c4797207c12058ad0306efab1190de99f99b98 (diff) | |
download | sonarqube-ad57a55ea39e3c012edf6ea57db88c0b813f5ae9.tar.gz sonarqube-ad57a55ea39e3c012edf6ea57db88c0b813f5ae9.zip |
Improve Javadoc of complexity metrics
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/measures/CoreMetrics.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/CoreMetrics.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/CoreMetrics.java index 43d4142f75d..9f9b132eb65 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/CoreMetrics.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/CoreMetrics.java @@ -363,6 +363,10 @@ public final class CoreMetrics { .create(); 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}. + */ 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) @@ -390,8 +394,7 @@ public final class CoreMetrics { public static final String CLASS_COMPLEXITY_KEY = "class_complexity"; /** - * Information about the cyclomatic complexity per class, calculated by divided the complexity in classes by the number of classes. - * If the complexity in classes is not available, the complexity of the file is used. + * Information about the cyclomatic complexity per class, calculated by divided the {@link #COMPLEXITY_IN_CLASSES} by the number of {@link #CLASSES}. */ public static final Metric<Double> CLASS_COMPLEXITY = new Metric.Builder(CLASS_COMPLEXITY_KEY, "Complexity / Class", Metric.ValueType.FLOAT) .setDescription("Complexity average by class") @@ -420,8 +423,7 @@ public final class CoreMetrics { public static final String FUNCTION_COMPLEXITY_KEY = "function_complexity"; /** - * Information about the cyclomatic complexity per function, calculated by divided the complexity in functions by the number of functions. - * If the complexity in functions is not available, the complexity of the file is used. + * Information about the cyclomatic complexity per function, calculated by divided the {@link #COMPLEXITY_IN_FUNCTIONS} by the number of {@link #FUNCTIONS}. */ public static final Metric<Double> FUNCTION_COMPLEXITY = new Metric.Builder(FUNCTION_COMPLEXITY_KEY, "Complexity / Function", Metric.ValueType.FLOAT) .setDescription("Complexity average by function") |