diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2012-03-14 23:54:44 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2012-03-14 23:58:01 +0100 |
commit | c8ca6faa8530fc6e1b42422b48500c82d6705c80 (patch) | |
tree | 4f98846b4e8df6b0702d470fdee32ed0fbdebd9d /plugins/sonar-squid-java-plugin | |
parent | f0e02076c17318fed53983bbff3bce5d820c06b1 (diff) | |
download | sonarqube-c8ca6faa8530fc6e1b42422b48500c82d6705c80.tar.gz sonarqube-c8ca6faa8530fc6e1b42422b48500c82d6705c80.zip |
SONAR-1378 Add the ability to specify a "type" when defining a plugin property
Diffstat (limited to 'plugins/sonar-squid-java-plugin')
-rw-r--r-- | plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/SquidPlugin.java | 57 |
1 files changed, 29 insertions, 28 deletions
diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/SquidPlugin.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/SquidPlugin.java index 2fefae93927..6e06dd8fde6 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/SquidPlugin.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/SquidPlugin.java @@ -29,39 +29,40 @@ import java.util.Arrays; import java.util.List; @Properties({ - @Property(key = SquidPluginProperties.SQUID_ANALYSE_ACCESSORS_PROPERTY, - defaultValue = SquidPluginProperties.SQUID_ANALYSE_ACCESSORS_DEFAULT_VALUE - + "", - name = "Separate accessors", - description = "Flag whether Squid should separate accessors (getters/setters) from methods. " + - "In that case, accessors are not counted in metrics such as complexity or API documentation.", - project = true, - global = true, - category = CoreProperties.CATEGORY_JAVA), - @Property(key = SquidPluginProperties.FIELDS_TO_EXCLUDE_FROM_LCOM4_COMPUTATION, - defaultValue = SquidPluginProperties.FIELDS_TO_EXCLUDE_FROM_LCOM4_COMPUTATION_DEFAULT_VALUE, - name = "List of fields to exclude from LCOM4 computation", - description = "Some fields should not be taken into account when computing LCOM4 measure as they " + - "unexpectedly and artificially decrease the LCOM4 measure. " - + "The best example is a logger used by all methods of a class. " + - "All field names to exclude from LCOM4 computation must be separated by a comma.", - project = true, - global = true, - category = CoreProperties.CATEGORY_JAVA), - @Property( - key = CoreProperties.DESIGN_SKIP_DESIGN_PROPERTY, - defaultValue = "" + CoreProperties.DESIGN_SKIP_DESIGN_DEFAULT_VALUE, - name = "Skip design analysis", - project = true, - global = true, - category = CoreProperties.CATEGORY_JAVA) + @Property(key = SquidPluginProperties.SQUID_ANALYSE_ACCESSORS_PROPERTY, + defaultValue = SquidPluginProperties.SQUID_ANALYSE_ACCESSORS_DEFAULT_VALUE + "", + name = "Separate accessors", + description = "Flag whether Squid should separate accessors (getters/setters) from methods. " + + "In that case, accessors are not counted in metrics such as complexity or API documentation.", + project = true, + global = true, + category = CoreProperties.CATEGORY_JAVA, + type = Property.Type.BOOLEAN), + @Property(key = SquidPluginProperties.FIELDS_TO_EXCLUDE_FROM_LCOM4_COMPUTATION, + defaultValue = SquidPluginProperties.FIELDS_TO_EXCLUDE_FROM_LCOM4_COMPUTATION_DEFAULT_VALUE, + name = "List of fields to exclude from LCOM4 computation", + description = "Some fields should not be taken into account when computing LCOM4 measure as they " + + "unexpectedly and artificially decrease the LCOM4 measure. " + + "The best example is a logger used by all methods of a class. " + + "All field names to exclude from LCOM4 computation must be separated by a comma.", + project = true, + global = true, + category = CoreProperties.CATEGORY_JAVA), + @Property( + key = CoreProperties.DESIGN_SKIP_DESIGN_PROPERTY, + defaultValue = "" + CoreProperties.DESIGN_SKIP_DESIGN_DEFAULT_VALUE, + name = "Skip design analysis", + project = true, + global = true, + category = CoreProperties.CATEGORY_JAVA, + type = Property.Type.BOOLEAN) }) public final class SquidPlugin extends SonarPlugin { public List getExtensions() { return Arrays.asList(SquidSensor.class, SquidRuleRepository.class, JavaSourceImporter.class, - ClassComplexityDistributionBuilder.class, FunctionComplexityDistributionBuilder.class, ClassesDecorator.class, - ChidamberKemererDistributionBuilder.class, FunctionsDecorator.class); + ClassComplexityDistributionBuilder.class, FunctionComplexityDistributionBuilder.class, ClassesDecorator.class, + ChidamberKemererDistributionBuilder.class, FunctionsDecorator.class); } } |