From 54466bd4d94fd6f6c764152ea60a7b913e4a4001 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20So=CC=88semann?= Date: Wed, 6 Mar 2019 21:59:32 +0100 Subject: [PATCH] Fix #1648 ([apex,vf] Remove CodeClimate dependency) --- docs/pages/release_notes.md | 6 ++++++ .../net/sourceforge/pmd/renderers/CodeClimateRule.java | 9 ++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/docs/pages/release_notes.md b/docs/pages/release_notes.md index fb4e8a736b..071bccd08b 100644 --- a/docs/pages/release_notes.md +++ b/docs/pages/release_notes.md @@ -28,6 +28,12 @@ This is a {{ site.pmd.release_type }} release. ### API Changes +#### Deprecated API + +* CodeClimateRule is deprecated in 7.0.0 because it was unused for 2 years and created an unwanted dependency. +Properties "cc_categories", "cc_remediation_points_multiplier", "cc_block_highlighting" will also be removed. +See [#1702](https://github.com/pmd/pmd/pull/1702) for more. + ### External Contributions * [#1704](https://github.com/pmd/pmd/pull/1704): \[java] Added AvoidUncheckedExceptionsInSignatures Rule - [Bhanu Prakash Pamidi](https://github.com/pamidi99) diff --git a/pmd-core/src/main/java/net/sourceforge/pmd/renderers/CodeClimateRule.java b/pmd-core/src/main/java/net/sourceforge/pmd/renderers/CodeClimateRule.java index 88991c7497..3bb3830be9 100644 --- a/pmd-core/src/main/java/net/sourceforge/pmd/renderers/CodeClimateRule.java +++ b/pmd-core/src/main/java/net/sourceforge/pmd/renderers/CodeClimateRule.java @@ -19,7 +19,10 @@ import net.sourceforge.pmd.properties.IntegerProperty; * This interface tags a Rule specifying properties required for the Code * Climate output format. Each rule implementing this interface must define the * two code climate properties "categories" and "remediation multiplier". + * + * @deprecated: This will be remove in 7.0.x (see the PR #1702) */ +@Deprecated public interface CodeClimateRule extends Rule { /** Represent a CodeClimate category. */ @@ -67,7 +70,7 @@ public interface CodeClimateRule extends Rule { */ EnumeratedMultiProperty CODECLIMATE_CATEGORIES // better would be to use CodeClimateCategory as values but might break the API = new EnumeratedMultiProperty<>("cc_categories", - "Code Climate Categories", + "deprecated! Code Climate Categories", CodeClimateCategory.categoryMap(), Collections.singletonList(CodeClimateCategory.STYLE.name), String.class, 1.0f); @@ -84,7 +87,7 @@ public interface CodeClimateRule extends Rule { // Note: We use a multiplier to the Code Climate default of 50000 for the // simplest possible remediation IntegerProperty CODECLIMATE_REMEDIATION_MULTIPLIER = new IntegerProperty("cc_remediation_points_multiplier", - "Code Climate Remediation Points multiplier", Integer.MIN_VALUE, + "deprecated! Code Climate Remediation Points multiplier", Integer.MIN_VALUE, Integer.MAX_VALUE / REMEDIATION_POINTS_DEFAULT, 1, 1.0f); /** @@ -93,5 +96,5 @@ public interface CodeClimateRule extends Rule { * highlighting is disabled for reasons of clarity. */ BooleanProperty CODECLIMATE_BLOCK_HIGHLIGHTING = new BooleanProperty("cc_block_highlighting", - "Code Climate Block Highlighting", false, 1.0f); + "deprecated! Code Climate Block Highlighting", false, 1.0f); }