From 0c95cb3c16c23b253de71278229e753eb55f8da1 Mon Sep 17 00:00:00 2001 From: guwirth Date: Thu, 6 Dec 2018 08:36:12 +0100 Subject: [PATCH 1/2] Mark static code analysis checks deprecated - Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead. --- .../org/sonar/cxx/checks/BooleanEqualityComparisonCheck.java | 4 +++- .../org/sonar/cxx/checks/CollapsibleIfCandidateCheck.java | 4 +++- .../main/java/org/sonar/cxx/checks/CommentedCodeCheck.java | 4 +++- .../java/org/sonar/cxx/checks/HardcodedAccountCheck.java | 4 +++- .../src/main/java/org/sonar/cxx/checks/HardcodedIpCheck.java | 4 +++- .../src/main/java/org/sonar/cxx/checks/MagicNumberCheck.java | 4 +++- .../java/org/sonar/cxx/checks/MissingCurlyBracesCheck.java | 4 +++- .../java/org/sonar/cxx/checks/NestedStatementsCheck.java | 3 ++- .../main/java/org/sonar/cxx/checks/ReservedNamesCheck.java | 4 +++- .../src/main/java/org/sonar/cxx/checks/SafetyTagCheck.java | 4 +++- .../org/sonar/cxx/checks/StringLiteralDuplicatedCheck.java | 4 +++- .../org/sonar/cxx/checks/SwitchLastCaseIsDefaultCheck.java | 4 +++- .../org/sonar/cxx/checks/UnnamedNamespaceInHeaderCheck.java | 4 +++- .../java/org/sonar/cxx/checks/UseCorrectIncludeCheck.java | 4 +++- .../main/java/org/sonar/cxx/checks/UseCorrectTypeCheck.java | 4 +++- .../java/org/sonar/cxx/checks/UselessParenthesesCheck.java | 4 +++- .../org/sonar/cxx/checks/UsingNamespaceInHeaderCheck.java | 4 +++- .../org/sonar/cxx/checks/metrics/TooManyParametersCheck.java | 3 ++- .../org/sonar/l10n/c/rules/c/BooleanEqualityComparison.html | 3 +++ .../org/sonar/l10n/c/rules/c/CollapsibleIfCandidate.html | 3 +++ .../resources/org/sonar/l10n/c/rules/c/CommentedCode.html | 5 +++++ .../resources/org/sonar/l10n/c/rules/c/HardcodedAccount.html | 3 +++ .../main/resources/org/sonar/l10n/c/rules/c/HardcodedIp.html | 5 +++++ .../main/resources/org/sonar/l10n/c/rules/c/MagicNumber.html | 3 +++ .../org/sonar/l10n/c/rules/c/MissingCurlyBraces.html | 4 ++++ .../resources/org/sonar/l10n/c/rules/c/NestedStatements.html | 3 +++ .../resources/org/sonar/l10n/c/rules/c/ReservedNames.html | 5 +++++ .../main/resources/org/sonar/l10n/c/rules/c/SafetyTag.html | 3 +++ .../org/sonar/l10n/c/rules/c/StringLiteralDuplicated.html | 3 +++ .../org/sonar/l10n/c/rules/c/SwitchLastCaseIsDefault.html | 3 +++ .../org/sonar/l10n/c/rules/c/TooManyParameters.html | 4 ++++ .../org/sonar/l10n/c/rules/c/UnnamedNamespaceInHeader.html | 5 +++++ .../org/sonar/l10n/c/rules/c/UseCorrectInclude.html | 3 +++ .../resources/org/sonar/l10n/c/rules/c/UseCorrectType.html | 3 +++ .../org/sonar/l10n/c/rules/c/UselessParentheses.html | 3 +++ .../org/sonar/l10n/c/rules/c/UsingNamespaceInHeader.html | 5 +++++ .../sonar/l10n/c++/rules/cxx/BooleanEqualityComparison.html | 3 +++ .../org/sonar/l10n/c++/rules/cxx/CollapsibleIfCandidate.html | 3 +++ .../org/sonar/l10n/c++/rules/cxx/CommentedCode.html | 5 +++++ .../org/sonar/l10n/c++/rules/cxx/HardcodedAccount.html | 3 +++ .../resources/org/sonar/l10n/c++/rules/cxx/HardcodedIp.html | 5 +++++ .../resources/org/sonar/l10n/c++/rules/cxx/MagicNumber.html | 3 +++ .../org/sonar/l10n/c++/rules/cxx/MissingCurlyBraces.html | 4 ++++ .../org/sonar/l10n/c++/rules/cxx/NestedStatements.html | 3 +++ .../org/sonar/l10n/c++/rules/cxx/ReservedNames.html | 5 +++++ .../resources/org/sonar/l10n/c++/rules/cxx/SafetyTag.html | 3 +++ .../sonar/l10n/c++/rules/cxx/StringLiteralDuplicated.html | 3 +++ .../sonar/l10n/c++/rules/cxx/SwitchLastCaseIsDefault.html | 3 +++ .../org/sonar/l10n/c++/rules/cxx/TooManyParameters.html | 4 ++++ .../sonar/l10n/c++/rules/cxx/UnnamedNamespaceInHeader.html | 5 +++++ .../org/sonar/l10n/c++/rules/cxx/UseCorrectInclude.html | 3 +++ .../org/sonar/l10n/c++/rules/cxx/UseCorrectType.html | 3 +++ .../org/sonar/l10n/c++/rules/cxx/UselessParentheses.html | 3 +++ .../org/sonar/l10n/c++/rules/cxx/UsingNamespaceInHeader.html | 5 +++++ 54 files changed, 184 insertions(+), 18 deletions(-) diff --git a/cxx-checks/src/main/java/org/sonar/cxx/checks/BooleanEqualityComparisonCheck.java b/cxx-checks/src/main/java/org/sonar/cxx/checks/BooleanEqualityComparisonCheck.java index 0f56889f0e..8a962cafe1 100644 --- a/cxx-checks/src/main/java/org/sonar/cxx/checks/BooleanEqualityComparisonCheck.java +++ b/cxx-checks/src/main/java/org/sonar/cxx/checks/BooleanEqualityComparisonCheck.java @@ -34,7 +34,9 @@ key = "BooleanEqualityComparison", name = "Literal boolean values should not be used in condition expressions", priority = Priority.MINOR, - tags = {Tag.CONVENTION}) + tags = {Tag.CONVENTION}, + status = "DEPRECATED" +) @ActivatedByDefault @SqaleConstantRemediation("5min") public class BooleanEqualityComparisonCheck extends SquidCheck { diff --git a/cxx-checks/src/main/java/org/sonar/cxx/checks/CollapsibleIfCandidateCheck.java b/cxx-checks/src/main/java/org/sonar/cxx/checks/CollapsibleIfCandidateCheck.java index a0ebb3334e..d51fa56b99 100644 --- a/cxx-checks/src/main/java/org/sonar/cxx/checks/CollapsibleIfCandidateCheck.java +++ b/cxx-checks/src/main/java/org/sonar/cxx/checks/CollapsibleIfCandidateCheck.java @@ -36,7 +36,9 @@ key = "CollapsibleIfCandidate", name = "Collapsible 'if' statements should be merged", priority = Priority.MAJOR, - tags = {Tag.BRAIN_OVERLOAD}) + tags = {Tag.BRAIN_OVERLOAD}, + status = "DEPRECATED" +) @ActivatedByDefault @SqaleConstantRemediation("5min") public class CollapsibleIfCandidateCheck extends SquidCheck { diff --git a/cxx-checks/src/main/java/org/sonar/cxx/checks/CommentedCodeCheck.java b/cxx-checks/src/main/java/org/sonar/cxx/checks/CommentedCodeCheck.java index 33d62699e2..ba2512b042 100644 --- a/cxx-checks/src/main/java/org/sonar/cxx/checks/CommentedCodeCheck.java +++ b/cxx-checks/src/main/java/org/sonar/cxx/checks/CommentedCodeCheck.java @@ -47,7 +47,9 @@ key = "CommentedCode", name = "Sections of code should not be 'commented out'", tags = {Tag.BAD_PRACTICE}, - priority = Priority.CRITICAL) + priority = Priority.CRITICAL, + status = "DEPRECATED" +) @ActivatedByDefault @SqaleConstantRemediation("5min") public class CommentedCodeCheck extends SquidCheck implements AstAndTokenVisitor { diff --git a/cxx-checks/src/main/java/org/sonar/cxx/checks/HardcodedAccountCheck.java b/cxx-checks/src/main/java/org/sonar/cxx/checks/HardcodedAccountCheck.java index f116074df8..78c8fbe1b4 100644 --- a/cxx-checks/src/main/java/org/sonar/cxx/checks/HardcodedAccountCheck.java +++ b/cxx-checks/src/main/java/org/sonar/cxx/checks/HardcodedAccountCheck.java @@ -41,7 +41,9 @@ key = "HardcodedAccount", name = "Do not hard code sensitive data in programs", tags = {Tag.CERT, Tag.SECURITY}, - priority = Priority.BLOCKER) + priority = Priority.BLOCKER, + status = "DEPRECATED" +) @ActivatedByDefault @SqaleConstantRemediation("30min") public class HardcodedAccountCheck extends SquidCheck { diff --git a/cxx-checks/src/main/java/org/sonar/cxx/checks/HardcodedIpCheck.java b/cxx-checks/src/main/java/org/sonar/cxx/checks/HardcodedIpCheck.java index 331eac9e94..d95b7dcbf9 100644 --- a/cxx-checks/src/main/java/org/sonar/cxx/checks/HardcodedIpCheck.java +++ b/cxx-checks/src/main/java/org/sonar/cxx/checks/HardcodedIpCheck.java @@ -37,7 +37,9 @@ key = "HardcodedIp", name = "IP addresses should not be hardcoded", tags = {Tag.CERT, Tag.SECURITY}, - priority = Priority.CRITICAL) + priority = Priority.CRITICAL, + status = "DEPRECATED" +) @ActivatedByDefault @SqaleConstantRemediation("30min") public class HardcodedIpCheck extends SquidCheck { diff --git a/cxx-checks/src/main/java/org/sonar/cxx/checks/MagicNumberCheck.java b/cxx-checks/src/main/java/org/sonar/cxx/checks/MagicNumberCheck.java index b2402c28a7..5eff9c2248 100755 --- a/cxx-checks/src/main/java/org/sonar/cxx/checks/MagicNumberCheck.java +++ b/cxx-checks/src/main/java/org/sonar/cxx/checks/MagicNumberCheck.java @@ -42,7 +42,9 @@ key = "MagicNumber", name = "Magic number should not be used", tags = {Tag.CONVENTION}, - priority = Priority.MINOR) + priority = Priority.MINOR, + status = "DEPRECATED" +) @ActivatedByDefault @SqaleConstantRemediation("5min") public class MagicNumberCheck extends SquidCheck { diff --git a/cxx-checks/src/main/java/org/sonar/cxx/checks/MissingCurlyBracesCheck.java b/cxx-checks/src/main/java/org/sonar/cxx/checks/MissingCurlyBracesCheck.java index 73a01cf239..fbb17393a1 100644 --- a/cxx-checks/src/main/java/org/sonar/cxx/checks/MissingCurlyBracesCheck.java +++ b/cxx-checks/src/main/java/org/sonar/cxx/checks/MissingCurlyBracesCheck.java @@ -35,7 +35,9 @@ key = "MissingCurlyBraces", name = "if/else/for/while/do statements should always use curly braces", tags = {Tag.CONVENTION, Tag.PITFALL}, - priority = Priority.MAJOR) + priority = Priority.MAJOR, + status = "DEPRECATED" +) @ActivatedByDefault @SqaleConstantRemediation("5min") public class MissingCurlyBracesCheck extends SquidCheck { diff --git a/cxx-checks/src/main/java/org/sonar/cxx/checks/NestedStatementsCheck.java b/cxx-checks/src/main/java/org/sonar/cxx/checks/NestedStatementsCheck.java index 2d7dfa81be..ba7b24b386 100644 --- a/cxx-checks/src/main/java/org/sonar/cxx/checks/NestedStatementsCheck.java +++ b/cxx-checks/src/main/java/org/sonar/cxx/checks/NestedStatementsCheck.java @@ -44,7 +44,8 @@ key = "NestedStatements", name = "Control flow statements \"if\", \"switch\", \"try\" and iterators should not be nested too deeply", tags = {Tag.BRAIN_OVERLOAD}, - priority = Priority.MAJOR + priority = Priority.MAJOR, + status = "DEPRECATED" ) @ActivatedByDefault @SqaleConstantRemediation("10min") diff --git a/cxx-checks/src/main/java/org/sonar/cxx/checks/ReservedNamesCheck.java b/cxx-checks/src/main/java/org/sonar/cxx/checks/ReservedNamesCheck.java index 8cdb060313..1c0b75537f 100644 --- a/cxx-checks/src/main/java/org/sonar/cxx/checks/ReservedNamesCheck.java +++ b/cxx-checks/src/main/java/org/sonar/cxx/checks/ReservedNamesCheck.java @@ -46,7 +46,9 @@ key = "ReservedNames", name = "Reserved names should not be used for preprocessor macros", tags = {Tag.PREPROCESSOR}, - priority = Priority.BLOCKER) + priority = Priority.BLOCKER, + status = "DEPRECATED" +) @ActivatedByDefault @SqaleConstantRemediation("5min") public class ReservedNamesCheck extends SquidCheck implements CxxCharsetAwareVisitor { diff --git a/cxx-checks/src/main/java/org/sonar/cxx/checks/SafetyTagCheck.java b/cxx-checks/src/main/java/org/sonar/cxx/checks/SafetyTagCheck.java index 6c751dbe13..f8688b13b8 100644 --- a/cxx-checks/src/main/java/org/sonar/cxx/checks/SafetyTagCheck.java +++ b/cxx-checks/src/main/java/org/sonar/cxx/checks/SafetyTagCheck.java @@ -42,7 +42,9 @@ key = "SafetyTag", name = "Risk mitigation implementation shall be defined in separate file", priority = Priority.BLOCKER, - tags = {Tag.CONVENTION}) + tags = {Tag.CONVENTION}, + status = "DEPRECATED" +) @ActivatedByDefault @SqaleConstantRemediation("5min") public class SafetyTagCheck extends SquidCheck implements AstAndTokenVisitor { diff --git a/cxx-checks/src/main/java/org/sonar/cxx/checks/StringLiteralDuplicatedCheck.java b/cxx-checks/src/main/java/org/sonar/cxx/checks/StringLiteralDuplicatedCheck.java index 8324107857..346039c042 100644 --- a/cxx-checks/src/main/java/org/sonar/cxx/checks/StringLiteralDuplicatedCheck.java +++ b/cxx-checks/src/main/java/org/sonar/cxx/checks/StringLiteralDuplicatedCheck.java @@ -37,7 +37,9 @@ key = "StringLiteralDuplicated", name = "String literals should not be duplicated", priority = Priority.MINOR, - tags = {Tag.BAD_PRACTICE}) + tags = {Tag.BAD_PRACTICE}, + status = "DEPRECATED" +) @ActivatedByDefault @SqaleConstantRemediation("5min") public class StringLiteralDuplicatedCheck extends SquidCheck { diff --git a/cxx-checks/src/main/java/org/sonar/cxx/checks/SwitchLastCaseIsDefaultCheck.java b/cxx-checks/src/main/java/org/sonar/cxx/checks/SwitchLastCaseIsDefaultCheck.java index 0ae8f33b6e..4ff91ee523 100644 --- a/cxx-checks/src/main/java/org/sonar/cxx/checks/SwitchLastCaseIsDefaultCheck.java +++ b/cxx-checks/src/main/java/org/sonar/cxx/checks/SwitchLastCaseIsDefaultCheck.java @@ -38,7 +38,9 @@ key = "SwitchLastCaseIsDefault", name = "Switch statements should end with a default case", priority = Priority.MAJOR, - tags = {Tag.BAD_PRACTICE, Tag.PITFALL}) + tags = {Tag.BAD_PRACTICE, Tag.PITFALL}, + status = "DEPRECATED" +) @ActivatedByDefault @SqaleConstantRemediation("5min") public class SwitchLastCaseIsDefaultCheck extends SquidCheck { diff --git a/cxx-checks/src/main/java/org/sonar/cxx/checks/UnnamedNamespaceInHeaderCheck.java b/cxx-checks/src/main/java/org/sonar/cxx/checks/UnnamedNamespaceInHeaderCheck.java index 3a129c422b..d212862d0e 100644 --- a/cxx-checks/src/main/java/org/sonar/cxx/checks/UnnamedNamespaceInHeaderCheck.java +++ b/cxx-checks/src/main/java/org/sonar/cxx/checks/UnnamedNamespaceInHeaderCheck.java @@ -33,7 +33,9 @@ key = "UnnamedNamespaceInHeader", name = "Unnamed namespaces are not allowed in header files", tags = {Tag.CONVENTION}, - priority = Priority.BLOCKER) + priority = Priority.BLOCKER, + status = "DEPRECATED" +) @ActivatedByDefault @SqaleConstantRemediation("5min") //similar Vera++ rule T017 diff --git a/cxx-checks/src/main/java/org/sonar/cxx/checks/UseCorrectIncludeCheck.java b/cxx-checks/src/main/java/org/sonar/cxx/checks/UseCorrectIncludeCheck.java index 847a088339..2c4119e97e 100644 --- a/cxx-checks/src/main/java/org/sonar/cxx/checks/UseCorrectIncludeCheck.java +++ b/cxx-checks/src/main/java/org/sonar/cxx/checks/UseCorrectIncludeCheck.java @@ -43,7 +43,9 @@ key = "UseCorrectInclude", name = "#include directive shall not use relative path", tags = {Tag.PREPROCESSOR}, - priority = Priority.BLOCKER) + priority = Priority.BLOCKER, + status = "DEPRECATED" +) @ActivatedByDefault @SqaleConstantRemediation("5min") public class UseCorrectIncludeCheck extends SquidCheck implements CxxCharsetAwareVisitor { diff --git a/cxx-checks/src/main/java/org/sonar/cxx/checks/UseCorrectTypeCheck.java b/cxx-checks/src/main/java/org/sonar/cxx/checks/UseCorrectTypeCheck.java index 1ea429bb32..e8cbb513d8 100644 --- a/cxx-checks/src/main/java/org/sonar/cxx/checks/UseCorrectTypeCheck.java +++ b/cxx-checks/src/main/java/org/sonar/cxx/checks/UseCorrectTypeCheck.java @@ -43,7 +43,9 @@ key = "UseCorrectType", name = "C++ type(s) shall be used", tags = {Tag.CONVENTION}, - priority = Priority.MINOR) + priority = Priority.MINOR, + status = "DEPRECATED" +) @RuleTemplate @NoSqale public class UseCorrectTypeCheck extends SquidCheck { diff --git a/cxx-checks/src/main/java/org/sonar/cxx/checks/UselessParenthesesCheck.java b/cxx-checks/src/main/java/org/sonar/cxx/checks/UselessParenthesesCheck.java index 4b8400d356..ded926a2d3 100644 --- a/cxx-checks/src/main/java/org/sonar/cxx/checks/UselessParenthesesCheck.java +++ b/cxx-checks/src/main/java/org/sonar/cxx/checks/UselessParenthesesCheck.java @@ -34,7 +34,9 @@ key = "UselessParentheses", name = "Useless parentheses around expressions should be removed to prevent any misunderstanding", priority = Priority.MAJOR, - tags = {Tag.CONFUSING}) + tags = {Tag.CONFUSING}, + status = "DEPRECATED" +) @ActivatedByDefault @SqaleConstantRemediation("1min") public class UselessParenthesesCheck extends SquidCheck { diff --git a/cxx-checks/src/main/java/org/sonar/cxx/checks/UsingNamespaceInHeaderCheck.java b/cxx-checks/src/main/java/org/sonar/cxx/checks/UsingNamespaceInHeaderCheck.java index f8a46b495c..a879d7ee86 100644 --- a/cxx-checks/src/main/java/org/sonar/cxx/checks/UsingNamespaceInHeaderCheck.java +++ b/cxx-checks/src/main/java/org/sonar/cxx/checks/UsingNamespaceInHeaderCheck.java @@ -34,7 +34,9 @@ key = "UsingNamespaceInHeader", name = "Using namespace directives are not allowed in header files", tags = {Tag.CONVENTION, Tag.PITFALL, Tag.BAD_PRACTICE}, - priority = Priority.BLOCKER) + priority = Priority.BLOCKER, + status = "DEPRECATED" +) @ActivatedByDefault @SqaleConstantRemediation("5min") //similar Vera++ rule T018 diff --git a/cxx-checks/src/main/java/org/sonar/cxx/checks/metrics/TooManyParametersCheck.java b/cxx-checks/src/main/java/org/sonar/cxx/checks/metrics/TooManyParametersCheck.java index 516845190d..c1a3fb7746 100644 --- a/cxx-checks/src/main/java/org/sonar/cxx/checks/metrics/TooManyParametersCheck.java +++ b/cxx-checks/src/main/java/org/sonar/cxx/checks/metrics/TooManyParametersCheck.java @@ -34,7 +34,8 @@ key = "TooManyParameters", priority = Priority.MAJOR, name = "Functions, methods and lambdas should not have too many parameters", - tags = {Tag.BRAIN_OVERLOAD} + tags = {Tag.BRAIN_OVERLOAD}, + status = "DEPRECATED" ) @SqaleConstantRemediation("20min") @ActivatedByDefault diff --git a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/BooleanEqualityComparison.html b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/BooleanEqualityComparison.html index a4f5c2794b..e34895c69b 100644 --- a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/BooleanEqualityComparison.html +++ b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/BooleanEqualityComparison.html @@ -1,6 +1,9 @@

Boolean expressions should not be compared against boolean literals, as their value can be directly used.

+
    +
  • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
  • +

The following code:

diff --git a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/CollapsibleIfCandidate.html b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/CollapsibleIfCandidate.html index 86ea1b0d46..c3ad5be0a5 100644 --- a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/CollapsibleIfCandidate.html +++ b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/CollapsibleIfCandidate.html @@ -1,4 +1,7 @@

Merging collapsible if statements increases the code's readability.

+
    +
  • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
  • +

The following code:

diff --git a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/CommentedCode.html b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/CommentedCode.html index 1cd09665ec..8d5721eeb5 100644 --- a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/CommentedCode.html +++ b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/CommentedCode.html @@ -1,3 +1,8 @@ +

Remove commented code.

+
    +
  • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
  • +
+

Here are the main reasons why commented code is a code smell:

    diff --git a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/HardcodedAccount.html b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/HardcodedAccount.html index 219965fca0..efe9d08bd1 100644 --- a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/HardcodedAccount.html +++ b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/HardcodedAccount.html @@ -1,4 +1,7 @@

    Be careful while handling sensitive data, such as passwords, in program code.

    +
      +
    • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
    • +

    Hard coding sensitive data is considered very bad programming practice because it enforces the requirement of the development environment to be secure.

    diff --git a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/HardcodedIp.html b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/HardcodedIp.html index 10260d21fc..b00d1386c9 100644 --- a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/HardcodedIp.html +++ b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/HardcodedIp.html @@ -1,3 +1,8 @@ +

    Remove hardcoded IP addresses.

    +
      +
    • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
    • +
    +

    Hardcoding an IP address into source code is a bad idea for several reasons:

      diff --git a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/MagicNumber.html b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/MagicNumber.html index f8b1b4d048..49104af29a 100644 --- a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/MagicNumber.html +++ b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/MagicNumber.html @@ -2,6 +2,9 @@ Numbers are not self-explanatory, they only are made of a value, which does not explain their purpose. Moreover, if the same number should be consistently used in multiple places, using a constant will ensure that all occurrences are updated at once.

      +
        +
      • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
      • +

      The following code:

      diff --git a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/MissingCurlyBraces.html b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/MissingCurlyBraces.html index 191d8ff496..1c57853883 100644 --- a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/MissingCurlyBraces.html +++ b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/MissingCurlyBraces.html @@ -1,6 +1,10 @@

      Not using curly braces could be error-prone in some cases. For instance in the following example, the two statements seems to be attached to the if statement whereas this is the case only for the first one:

      +
        +
      • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
      • +
      +
       if (condition) // Non-Compliant
         executeSomething();
      diff --git a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/NestedStatements.html b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/NestedStatements.html
      index 35fece0623..dd225bdabc 100644
      --- a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/NestedStatements.html
      +++ b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/NestedStatements.html
      @@ -3,6 +3,9 @@
       do) statements are a key ingredient for making what's known as "Spaghetti code". Such code is hard to read,
       refactor and therefore maintain.
       

      +
        +
      • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
      • +

      Noncompliant Code Example

      diff --git a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/ReservedNames.html b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/ReservedNames.html index 26a93e2f00..b9c16beef2 100644 --- a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/ReservedNames.html +++ b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/ReservedNames.html @@ -1,3 +1,8 @@ +

      Don't use reserved names.

      +
        +
      • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
      • +
      +

      The C++ Standard reserves some forms of names for language implementations. One of the most frequent violations is a definition of preprocessor macro that begins with underscore diff --git a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/SafetyTag.html b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/SafetyTag.html index 312787f6b8..7c754135ef 100644 --- a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/SafetyTag.html +++ b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/SafetyTag.html @@ -4,4 +4,7 @@

      Therefore separation of the source code makes it easier to monitor updates or test coverage.

      +
        +
      • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
      • +
      diff --git a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/StringLiteralDuplicated.html b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/StringLiteralDuplicated.html index 3f5b861b7e..98d44c809c 100644 --- a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/StringLiteralDuplicated.html +++ b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/StringLiteralDuplicated.html @@ -2,6 +2,9 @@ Duplicated string literals are error-prone to refactor, as one must pay attention to update all occurrences. Constants can be referenced from many places, but there value is updated in a single place.

      +
        +
      • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
      • +

      The following code:

      diff --git a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/SwitchLastCaseIsDefault.html b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/SwitchLastCaseIsDefault.html index 4731fef131..1538751191 100644 --- a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/SwitchLastCaseIsDefault.html +++ b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/SwitchLastCaseIsDefault.html @@ -2,6 +2,9 @@ The requirement for a final default clause is defensive programming. This clause should either take appropriate action or contain a suitable comment as to why no action is taken.

      +
        +
      • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
      • +

      The following code snippet illustrates this rule: diff --git a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/TooManyParameters.html b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/TooManyParameters.html index 54e3e80818..87b64232ea 100644 --- a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/TooManyParameters.html +++ b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/TooManyParameters.html @@ -2,4 +2,8 @@

      Functions with many parameters are hard to test, maintain and reuse.

      +
        +
      • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
      • +
      + diff --git a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/UnnamedNamespaceInHeader.html b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/UnnamedNamespaceInHeader.html index 53c7c8d4e7..290884b90e 100644 --- a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/UnnamedNamespaceInHeader.html +++ b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/UnnamedNamespaceInHeader.html @@ -1,3 +1,8 @@ +

      Unnamed namespaces in header files.

      +
        +
      • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
      • +
      +

      The typical use of unnamed namespace is to hide module-internal names from the outside world. Header files are physically concatenated in a single translation unit, which logically diff --git a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/UseCorrectInclude.html b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/UseCorrectInclude.html index f60ee895ec..ec4fe73a6e 100644 --- a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/UseCorrectInclude.html +++ b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/UseCorrectInclude.html @@ -1,6 +1,9 @@

      The #include directive shall only refer to predefined folders and therefore relative paths are not allowed.

      +
        +
      • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
      • +

      The following code snippet illustrates this rule: diff --git a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/UseCorrectType.html b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/UseCorrectType.html index e0e89ecc70..7fd86e8428 100644 --- a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/UseCorrectType.html +++ b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/UseCorrectType.html @@ -2,6 +2,9 @@ Legacy code often use primitive types which shall be avoided or limited to platform APIs. C++ types shall be used instead.

      +
        +
      • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
      • +

      Avoid using the following types:

      diff --git a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/UselessParentheses.html b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/UselessParentheses.html index 1bd0ee54e3..298159c6a7 100644 --- a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/UselessParentheses.html +++ b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/UselessParentheses.html @@ -1,6 +1,9 @@

      Useless parentheses can sometimes be misleading and so should be removed.

      +
        +
      • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
      • +

      The following code snippet illustrates this rule: diff --git a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/UsingNamespaceInHeader.html b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/UsingNamespaceInHeader.html index 40289bdbb5..d341e1a0d0 100644 --- a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/UsingNamespaceInHeader.html +++ b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/UsingNamespaceInHeader.html @@ -1,3 +1,8 @@ +

      Namespace directive in header files.

      +
        +
      • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
      • +
      +

      The using namespace directive imports names from the given namespace and when used in a header file influences the global namespace of all the files that directly or indirectly include diff --git a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/BooleanEqualityComparison.html b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/BooleanEqualityComparison.html index a4f5c2794b..e34895c69b 100644 --- a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/BooleanEqualityComparison.html +++ b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/BooleanEqualityComparison.html @@ -1,6 +1,9 @@

      Boolean expressions should not be compared against boolean literals, as their value can be directly used.

      +
        +
      • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
      • +

      The following code:

      diff --git a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/CollapsibleIfCandidate.html b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/CollapsibleIfCandidate.html index 86ea1b0d46..c3ad5be0a5 100644 --- a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/CollapsibleIfCandidate.html +++ b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/CollapsibleIfCandidate.html @@ -1,4 +1,7 @@

      Merging collapsible if statements increases the code's readability.

      +
        +
      • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
      • +

      The following code:

      diff --git a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/CommentedCode.html b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/CommentedCode.html index 1cd09665ec..8d5721eeb5 100644 --- a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/CommentedCode.html +++ b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/CommentedCode.html @@ -1,3 +1,8 @@ +

      Remove commented code.

      +
        +
      • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
      • +
      +

      Here are the main reasons why commented code is a code smell:

        diff --git a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/HardcodedAccount.html b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/HardcodedAccount.html index 219965fca0..efe9d08bd1 100644 --- a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/HardcodedAccount.html +++ b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/HardcodedAccount.html @@ -1,4 +1,7 @@

        Be careful while handling sensitive data, such as passwords, in program code.

        +
          +
        • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
        • +

        Hard coding sensitive data is considered very bad programming practice because it enforces the requirement of the development environment to be secure.

        diff --git a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/HardcodedIp.html b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/HardcodedIp.html index 10260d21fc..b00d1386c9 100644 --- a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/HardcodedIp.html +++ b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/HardcodedIp.html @@ -1,3 +1,8 @@ +

        Remove hardcoded IP addresses.

        +
          +
        • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
        • +
        +

        Hardcoding an IP address into source code is a bad idea for several reasons:

          diff --git a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/MagicNumber.html b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/MagicNumber.html index f8b1b4d048..49104af29a 100644 --- a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/MagicNumber.html +++ b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/MagicNumber.html @@ -2,6 +2,9 @@ Numbers are not self-explanatory, they only are made of a value, which does not explain their purpose. Moreover, if the same number should be consistently used in multiple places, using a constant will ensure that all occurrences are updated at once.

          +
            +
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +

          The following code:

          diff --git a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/MissingCurlyBraces.html b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/MissingCurlyBraces.html index 191d8ff496..1c57853883 100644 --- a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/MissingCurlyBraces.html +++ b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/MissingCurlyBraces.html @@ -1,6 +1,10 @@

          Not using curly braces could be error-prone in some cases. For instance in the following example, the two statements seems to be attached to the if statement whereas this is the case only for the first one:

          +
            +
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +
          +
           if (condition) // Non-Compliant
             executeSomething();
          diff --git a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/NestedStatements.html b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/NestedStatements.html
          index 35fece0623..dd225bdabc 100644
          --- a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/NestedStatements.html
          +++ b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/NestedStatements.html
          @@ -3,6 +3,9 @@
           do) statements are a key ingredient for making what's known as "Spaghetti code". Such code is hard to read,
           refactor and therefore maintain.
           

          +
            +
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +

          Noncompliant Code Example

          diff --git a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/ReservedNames.html b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/ReservedNames.html index 26a93e2f00..b9c16beef2 100644 --- a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/ReservedNames.html +++ b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/ReservedNames.html @@ -1,3 +1,8 @@ +

          Don't use reserved names.

          +
            +
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +
          +

          The C++ Standard reserves some forms of names for language implementations. One of the most frequent violations is a definition of preprocessor macro that begins with underscore diff --git a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/SafetyTag.html b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/SafetyTag.html index 312787f6b8..7c754135ef 100644 --- a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/SafetyTag.html +++ b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/SafetyTag.html @@ -4,4 +4,7 @@

          Therefore separation of the source code makes it easier to monitor updates or test coverage.

          +
            +
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +
          diff --git a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/StringLiteralDuplicated.html b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/StringLiteralDuplicated.html index 3f5b861b7e..98d44c809c 100644 --- a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/StringLiteralDuplicated.html +++ b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/StringLiteralDuplicated.html @@ -2,6 +2,9 @@ Duplicated string literals are error-prone to refactor, as one must pay attention to update all occurrences. Constants can be referenced from many places, but there value is updated in a single place.

          +
            +
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +

          The following code:

          diff --git a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/SwitchLastCaseIsDefault.html b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/SwitchLastCaseIsDefault.html index 4731fef131..1538751191 100644 --- a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/SwitchLastCaseIsDefault.html +++ b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/SwitchLastCaseIsDefault.html @@ -2,6 +2,9 @@ The requirement for a final default clause is defensive programming. This clause should either take appropriate action or contain a suitable comment as to why no action is taken.

          +
            +
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +

          The following code snippet illustrates this rule: diff --git a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/TooManyParameters.html b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/TooManyParameters.html index 54e3e80818..87b64232ea 100644 --- a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/TooManyParameters.html +++ b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/TooManyParameters.html @@ -2,4 +2,8 @@

          Functions with many parameters are hard to test, maintain and reuse.

          +
            +
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +
          + diff --git a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/UnnamedNamespaceInHeader.html b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/UnnamedNamespaceInHeader.html index 53c7c8d4e7..290884b90e 100644 --- a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/UnnamedNamespaceInHeader.html +++ b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/UnnamedNamespaceInHeader.html @@ -1,3 +1,8 @@ +

          Unnamed namespaces in header files.

          +
            +
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +
          +

          The typical use of unnamed namespace is to hide module-internal names from the outside world. Header files are physically concatenated in a single translation unit, which logically diff --git a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/UseCorrectInclude.html b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/UseCorrectInclude.html index f60ee895ec..ec4fe73a6e 100644 --- a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/UseCorrectInclude.html +++ b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/UseCorrectInclude.html @@ -1,6 +1,9 @@

          The #include directive shall only refer to predefined folders and therefore relative paths are not allowed.

          +
            +
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +

          The following code snippet illustrates this rule: diff --git a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/UseCorrectType.html b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/UseCorrectType.html index e0e89ecc70..7fd86e8428 100644 --- a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/UseCorrectType.html +++ b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/UseCorrectType.html @@ -2,6 +2,9 @@ Legacy code often use primitive types which shall be avoided or limited to platform APIs. C++ types shall be used instead.

          +
            +
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +

          Avoid using the following types:

          diff --git a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/UselessParentheses.html b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/UselessParentheses.html index 1bd0ee54e3..298159c6a7 100644 --- a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/UselessParentheses.html +++ b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/UselessParentheses.html @@ -1,6 +1,9 @@

          Useless parentheses can sometimes be misleading and so should be removed.

          +
            +
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +

          The following code snippet illustrates this rule: diff --git a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/UsingNamespaceInHeader.html b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/UsingNamespaceInHeader.html index 40289bdbb5..d341e1a0d0 100644 --- a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/UsingNamespaceInHeader.html +++ b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/UsingNamespaceInHeader.html @@ -1,3 +1,8 @@ +

          Namespace directive in header files.

          +
            +
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +
          +

          The using namespace directive imports names from the given namespace and when used in a header file influences the global namespace of all the files that directly or indirectly include From 6efd0d20d8d8cabcd5a383054e1f3a06204617b5 Mon Sep 17 00:00:00 2001 From: guwirth Date: Sat, 8 Dec 2018 18:50:01 +0100 Subject: [PATCH 2/2] improve html --- .../org/sonar/l10n/c/rules/c/BooleanEqualityComparison.html | 2 +- .../org/sonar/l10n/c/rules/c/CollapsibleIfCandidate.html | 2 +- .../main/resources/org/sonar/l10n/c/rules/c/CommentedCode.html | 2 +- .../resources/org/sonar/l10n/c/rules/c/HardcodedAccount.html | 2 +- .../main/resources/org/sonar/l10n/c/rules/c/HardcodedIp.html | 2 +- .../main/resources/org/sonar/l10n/c/rules/c/MagicNumber.html | 2 +- .../resources/org/sonar/l10n/c/rules/c/MissingCurlyBraces.html | 2 +- .../resources/org/sonar/l10n/c/rules/c/NestedStatements.html | 2 +- .../main/resources/org/sonar/l10n/c/rules/c/ReservedNames.html | 2 +- .../src/main/resources/org/sonar/l10n/c/rules/c/SafetyTag.html | 2 +- .../org/sonar/l10n/c/rules/c/StringLiteralDuplicated.html | 2 +- .../org/sonar/l10n/c/rules/c/SwitchLastCaseIsDefault.html | 2 +- .../resources/org/sonar/l10n/c/rules/c/TooManyParameters.html | 2 +- .../org/sonar/l10n/c/rules/c/UnnamedNamespaceInHeader.html | 2 +- .../resources/org/sonar/l10n/c/rules/c/UseCorrectInclude.html | 2 +- .../main/resources/org/sonar/l10n/c/rules/c/UseCorrectType.html | 2 +- .../resources/org/sonar/l10n/c/rules/c/UselessParentheses.html | 2 +- .../org/sonar/l10n/c/rules/c/UsingNamespaceInHeader.html | 2 +- .../org/sonar/l10n/c++/rules/cxx/BooleanEqualityComparison.html | 2 +- .../org/sonar/l10n/c++/rules/cxx/CollapsibleIfCandidate.html | 2 +- .../resources/org/sonar/l10n/c++/rules/cxx/CommentedCode.html | 2 +- .../org/sonar/l10n/c++/rules/cxx/HardcodedAccount.html | 2 +- .../resources/org/sonar/l10n/c++/rules/cxx/HardcodedIp.html | 2 +- .../resources/org/sonar/l10n/c++/rules/cxx/MagicNumber.html | 2 +- .../org/sonar/l10n/c++/rules/cxx/MissingCurlyBraces.html | 2 +- .../org/sonar/l10n/c++/rules/cxx/NestedStatements.html | 2 +- .../resources/org/sonar/l10n/c++/rules/cxx/ReservedNames.html | 2 +- .../main/resources/org/sonar/l10n/c++/rules/cxx/SafetyTag.html | 2 +- .../org/sonar/l10n/c++/rules/cxx/StringLiteralDuplicated.html | 2 +- .../org/sonar/l10n/c++/rules/cxx/SwitchLastCaseIsDefault.html | 2 +- .../org/sonar/l10n/c++/rules/cxx/TooManyParameters.html | 2 +- .../org/sonar/l10n/c++/rules/cxx/UnnamedNamespaceInHeader.html | 2 +- .../org/sonar/l10n/c++/rules/cxx/UseCorrectInclude.html | 2 +- .../resources/org/sonar/l10n/c++/rules/cxx/UseCorrectType.html | 2 +- .../org/sonar/l10n/c++/rules/cxx/UselessParentheses.html | 2 +- .../org/sonar/l10n/c++/rules/cxx/UsingNamespaceInHeader.html | 2 +- 36 files changed, 36 insertions(+), 36 deletions(-) diff --git a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/BooleanEqualityComparison.html b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/BooleanEqualityComparison.html index e34895c69b..90b180c12d 100644 --- a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/BooleanEqualityComparison.html +++ b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/BooleanEqualityComparison.html @@ -2,7 +2,7 @@ Boolean expressions should not be compared against boolean literals, as their value can be directly used.

            -
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +
          • DEPRECATED: Internal static code analysis checks will no longer be supported in future versions. Plug-in is able to import analysis reports from various external tools. Please consider using external code analyzers instead of deprecated internal ones.

          The following code:

          diff --git a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/CollapsibleIfCandidate.html b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/CollapsibleIfCandidate.html index c3ad5be0a5..93ebe4704f 100644 --- a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/CollapsibleIfCandidate.html +++ b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/CollapsibleIfCandidate.html @@ -1,6 +1,6 @@

          Merging collapsible if statements increases the code's readability.

            -
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +
          • DEPRECATED: Internal static code analysis checks will no longer be supported in future versions. Plug-in is able to import analysis reports from various external tools. Please consider using external code analyzers instead of deprecated internal ones.

          The following code:

          diff --git a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/CommentedCode.html b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/CommentedCode.html index 8d5721eeb5..c256f42d02 100644 --- a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/CommentedCode.html +++ b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/CommentedCode.html @@ -1,6 +1,6 @@

          Remove commented code.

            -
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +
          • DEPRECATED: Internal static code analysis checks will no longer be supported in future versions. Plug-in is able to import analysis reports from various external tools. Please consider using external code analyzers instead of deprecated internal ones.

          Here are the main reasons why commented code is a code smell:

          diff --git a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/HardcodedAccount.html b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/HardcodedAccount.html index efe9d08bd1..455827155e 100644 --- a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/HardcodedAccount.html +++ b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/HardcodedAccount.html @@ -1,6 +1,6 @@

          Be careful while handling sensitive data, such as passwords, in program code.

            -
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +
          • DEPRECATED: Internal static code analysis checks will no longer be supported in future versions. Plug-in is able to import analysis reports from various external tools. Please consider using external code analyzers instead of deprecated internal ones.

          Hard coding sensitive data is considered very bad programming practice because it enforces the requirement of the development environment to be secure.

          diff --git a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/HardcodedIp.html b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/HardcodedIp.html index b00d1386c9..ca25c5ddf1 100644 --- a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/HardcodedIp.html +++ b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/HardcodedIp.html @@ -1,6 +1,6 @@

          Remove hardcoded IP addresses.

            -
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +
          • DEPRECATED: Internal static code analysis checks will no longer be supported in future versions. Plug-in is able to import analysis reports from various external tools. Please consider using external code analyzers instead of deprecated internal ones.

          Hardcoding an IP address into source code is a bad idea for several reasons:

          diff --git a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/MagicNumber.html b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/MagicNumber.html index 49104af29a..64a2302130 100644 --- a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/MagicNumber.html +++ b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/MagicNumber.html @@ -3,7 +3,7 @@ Moreover, if the same number should be consistently used in multiple places, using a constant will ensure that all occurrences are updated at once.

            -
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +
          • DEPRECATED: Internal static code analysis checks will no longer be supported in future versions. Plug-in is able to import analysis reports from various external tools. Please consider using external code analyzers instead of deprecated internal ones.

          The following code:

          diff --git a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/MissingCurlyBraces.html b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/MissingCurlyBraces.html index 1c57853883..c9cb92539f 100644 --- a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/MissingCurlyBraces.html +++ b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/MissingCurlyBraces.html @@ -2,7 +2,7 @@ Not using curly braces could be error-prone in some cases. For instance in the following example, the two statements seems to be attached to the if statement whereas this is the case only for the first one:

            -
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +
          • DEPRECATED: Internal static code analysis checks will no longer be supported in future versions. Plug-in is able to import analysis reports from various external tools. Please consider using external code analyzers instead of deprecated internal ones.
          diff --git a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/NestedStatements.html b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/NestedStatements.html
          index dd225bdabc..ad81146e6e 100644
          --- a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/NestedStatements.html
          +++ b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/NestedStatements.html
          @@ -4,7 +4,7 @@
           refactor and therefore maintain.
           

            -
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +
          • DEPRECATED: Internal static code analysis checks will no longer be supported in future versions. Plug-in is able to import analysis reports from various external tools. Please consider using external code analyzers instead of deprecated internal ones.

          Noncompliant Code Example

          diff --git a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/ReservedNames.html b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/ReservedNames.html index b9c16beef2..7257ca48b7 100644 --- a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/ReservedNames.html +++ b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/ReservedNames.html @@ -1,6 +1,6 @@

          Don't use reserved names.

            -
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +
          • DEPRECATED: Internal static code analysis checks will no longer be supported in future versions. Plug-in is able to import analysis reports from various external tools. Please consider using external code analyzers instead of deprecated internal ones.

          The C++ Standard reserves some forms of names for language diff --git a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/SafetyTag.html b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/SafetyTag.html index 7c754135ef..188ef58bf5 100644 --- a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/SafetyTag.html +++ b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/SafetyTag.html @@ -5,6 +5,6 @@

          Therefore separation of the source code makes it easier to monitor updates or test coverage.

            -
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +
          • DEPRECATED: Internal static code analysis checks will no longer be supported in future versions. Plug-in is able to import analysis reports from various external tools. Please consider using external code analyzers instead of deprecated internal ones.
          diff --git a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/StringLiteralDuplicated.html b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/StringLiteralDuplicated.html index 98d44c809c..94877f0523 100644 --- a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/StringLiteralDuplicated.html +++ b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/StringLiteralDuplicated.html @@ -3,7 +3,7 @@ Constants can be referenced from many places, but there value is updated in a single place.

            -
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +
          • DEPRECATED: Internal static code analysis checks will no longer be supported in future versions. Plug-in is able to import analysis reports from various external tools. Please consider using external code analyzers instead of deprecated internal ones.

          The following code:

          diff --git a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/SwitchLastCaseIsDefault.html b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/SwitchLastCaseIsDefault.html index 1538751191..51e74709da 100644 --- a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/SwitchLastCaseIsDefault.html +++ b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/SwitchLastCaseIsDefault.html @@ -3,7 +3,7 @@ This clause should either take appropriate action or contain a suitable comment as to why no action is taken.

            -
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +
          • DEPRECATED: Internal static code analysis checks will no longer be supported in future versions. Plug-in is able to import analysis reports from various external tools. Please consider using external code analyzers instead of deprecated internal ones.

          diff --git a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/TooManyParameters.html b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/TooManyParameters.html index 87b64232ea..de942f9f1f 100644 --- a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/TooManyParameters.html +++ b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/TooManyParameters.html @@ -3,7 +3,7 @@ Functions with many parameters are hard to test, maintain and reuse.

            -
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +
          • DEPRECATED: Internal static code analysis checks will no longer be supported in future versions. Plug-in is able to import analysis reports from various external tools. Please consider using external code analyzers instead of deprecated internal ones.
          diff --git a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/UnnamedNamespaceInHeader.html b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/UnnamedNamespaceInHeader.html index 290884b90e..2ae40b6bd8 100644 --- a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/UnnamedNamespaceInHeader.html +++ b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/UnnamedNamespaceInHeader.html @@ -1,6 +1,6 @@

          Unnamed namespaces in header files.

            -
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +
          • DEPRECATED: Internal static code analysis checks will no longer be supported in future versions. Plug-in is able to import analysis reports from various external tools. Please consider using external code analyzers instead of deprecated internal ones.

          The typical use of unnamed namespace is to hide module-internal diff --git a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/UseCorrectInclude.html b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/UseCorrectInclude.html index ec4fe73a6e..bbd81ac932 100644 --- a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/UseCorrectInclude.html +++ b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/UseCorrectInclude.html @@ -2,7 +2,7 @@ The #include directive shall only refer to predefined folders and therefore relative paths are not allowed.

            -
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +
          • DEPRECATED: Internal static code analysis checks will no longer be supported in future versions. Plug-in is able to import analysis reports from various external tools. Please consider using external code analyzers instead of deprecated internal ones.

          diff --git a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/UseCorrectType.html b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/UseCorrectType.html index 7fd86e8428..2ec787ecbe 100644 --- a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/UseCorrectType.html +++ b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/UseCorrectType.html @@ -3,7 +3,7 @@ C++ types shall be used instead.

            -
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +
          • DEPRECATED: Internal static code analysis checks will no longer be supported in future versions. Plug-in is able to import analysis reports from various external tools. Please consider using external code analyzers instead of deprecated internal ones.

          Avoid using the following types:

          diff --git a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/UselessParentheses.html b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/UselessParentheses.html index 298159c6a7..5df9893e32 100644 --- a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/UselessParentheses.html +++ b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/UselessParentheses.html @@ -2,7 +2,7 @@ Useless parentheses can sometimes be misleading and so should be removed.

            -
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +
          • DEPRECATED: Internal static code analysis checks will no longer be supported in future versions. Plug-in is able to import analysis reports from various external tools. Please consider using external code analyzers instead of deprecated internal ones.

          diff --git a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/UsingNamespaceInHeader.html b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/UsingNamespaceInHeader.html index d341e1a0d0..86b5eb61dc 100644 --- a/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/UsingNamespaceInHeader.html +++ b/sonar-c-plugin/src/main/resources/org/sonar/l10n/c/rules/c/UsingNamespaceInHeader.html @@ -1,6 +1,6 @@

          Namespace directive in header files.

            -
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +
          • DEPRECATED: Internal static code analysis checks will no longer be supported in future versions. Plug-in is able to import analysis reports from various external tools. Please consider using external code analyzers instead of deprecated internal ones.

          The using namespace directive imports names from the given diff --git a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/BooleanEqualityComparison.html b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/BooleanEqualityComparison.html index e34895c69b..90b180c12d 100644 --- a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/BooleanEqualityComparison.html +++ b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/BooleanEqualityComparison.html @@ -2,7 +2,7 @@ Boolean expressions should not be compared against boolean literals, as their value can be directly used.

            -
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +
          • DEPRECATED: Internal static code analysis checks will no longer be supported in future versions. Plug-in is able to import analysis reports from various external tools. Please consider using external code analyzers instead of deprecated internal ones.

          The following code:

          diff --git a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/CollapsibleIfCandidate.html b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/CollapsibleIfCandidate.html index c3ad5be0a5..93ebe4704f 100644 --- a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/CollapsibleIfCandidate.html +++ b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/CollapsibleIfCandidate.html @@ -1,6 +1,6 @@

          Merging collapsible if statements increases the code's readability.

            -
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +
          • DEPRECATED: Internal static code analysis checks will no longer be supported in future versions. Plug-in is able to import analysis reports from various external tools. Please consider using external code analyzers instead of deprecated internal ones.

          The following code:

          diff --git a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/CommentedCode.html b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/CommentedCode.html index 8d5721eeb5..c256f42d02 100644 --- a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/CommentedCode.html +++ b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/CommentedCode.html @@ -1,6 +1,6 @@

          Remove commented code.

            -
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +
          • DEPRECATED: Internal static code analysis checks will no longer be supported in future versions. Plug-in is able to import analysis reports from various external tools. Please consider using external code analyzers instead of deprecated internal ones.

          Here are the main reasons why commented code is a code smell:

          diff --git a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/HardcodedAccount.html b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/HardcodedAccount.html index efe9d08bd1..455827155e 100644 --- a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/HardcodedAccount.html +++ b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/HardcodedAccount.html @@ -1,6 +1,6 @@

          Be careful while handling sensitive data, such as passwords, in program code.

            -
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +
          • DEPRECATED: Internal static code analysis checks will no longer be supported in future versions. Plug-in is able to import analysis reports from various external tools. Please consider using external code analyzers instead of deprecated internal ones.

          Hard coding sensitive data is considered very bad programming practice because it enforces the requirement of the development environment to be secure.

          diff --git a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/HardcodedIp.html b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/HardcodedIp.html index b00d1386c9..ca25c5ddf1 100644 --- a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/HardcodedIp.html +++ b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/HardcodedIp.html @@ -1,6 +1,6 @@

          Remove hardcoded IP addresses.

            -
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +
          • DEPRECATED: Internal static code analysis checks will no longer be supported in future versions. Plug-in is able to import analysis reports from various external tools. Please consider using external code analyzers instead of deprecated internal ones.

          Hardcoding an IP address into source code is a bad idea for several reasons:

          diff --git a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/MagicNumber.html b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/MagicNumber.html index 49104af29a..64a2302130 100644 --- a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/MagicNumber.html +++ b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/MagicNumber.html @@ -3,7 +3,7 @@ Moreover, if the same number should be consistently used in multiple places, using a constant will ensure that all occurrences are updated at once.

            -
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +
          • DEPRECATED: Internal static code analysis checks will no longer be supported in future versions. Plug-in is able to import analysis reports from various external tools. Please consider using external code analyzers instead of deprecated internal ones.

          The following code:

          diff --git a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/MissingCurlyBraces.html b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/MissingCurlyBraces.html index 1c57853883..c9cb92539f 100644 --- a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/MissingCurlyBraces.html +++ b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/MissingCurlyBraces.html @@ -2,7 +2,7 @@ Not using curly braces could be error-prone in some cases. For instance in the following example, the two statements seems to be attached to the if statement whereas this is the case only for the first one:

            -
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +
          • DEPRECATED: Internal static code analysis checks will no longer be supported in future versions. Plug-in is able to import analysis reports from various external tools. Please consider using external code analyzers instead of deprecated internal ones.
          diff --git a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/NestedStatements.html b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/NestedStatements.html
          index dd225bdabc..ad81146e6e 100644
          --- a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/NestedStatements.html
          +++ b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/NestedStatements.html
          @@ -4,7 +4,7 @@
           refactor and therefore maintain.
           

            -
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +
          • DEPRECATED: Internal static code analysis checks will no longer be supported in future versions. Plug-in is able to import analysis reports from various external tools. Please consider using external code analyzers instead of deprecated internal ones.

          Noncompliant Code Example

          diff --git a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/ReservedNames.html b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/ReservedNames.html index b9c16beef2..7257ca48b7 100644 --- a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/ReservedNames.html +++ b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/ReservedNames.html @@ -1,6 +1,6 @@

          Don't use reserved names.

            -
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +
          • DEPRECATED: Internal static code analysis checks will no longer be supported in future versions. Plug-in is able to import analysis reports from various external tools. Please consider using external code analyzers instead of deprecated internal ones.

          The C++ Standard reserves some forms of names for language diff --git a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/SafetyTag.html b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/SafetyTag.html index 7c754135ef..188ef58bf5 100644 --- a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/SafetyTag.html +++ b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/SafetyTag.html @@ -5,6 +5,6 @@

          Therefore separation of the source code makes it easier to monitor updates or test coverage.

            -
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +
          • DEPRECATED: Internal static code analysis checks will no longer be supported in future versions. Plug-in is able to import analysis reports from various external tools. Please consider using external code analyzers instead of deprecated internal ones.
          diff --git a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/StringLiteralDuplicated.html b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/StringLiteralDuplicated.html index 98d44c809c..94877f0523 100644 --- a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/StringLiteralDuplicated.html +++ b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/StringLiteralDuplicated.html @@ -3,7 +3,7 @@ Constants can be referenced from many places, but there value is updated in a single place.

            -
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +
          • DEPRECATED: Internal static code analysis checks will no longer be supported in future versions. Plug-in is able to import analysis reports from various external tools. Please consider using external code analyzers instead of deprecated internal ones.

          The following code:

          diff --git a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/SwitchLastCaseIsDefault.html b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/SwitchLastCaseIsDefault.html index 1538751191..51e74709da 100644 --- a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/SwitchLastCaseIsDefault.html +++ b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/SwitchLastCaseIsDefault.html @@ -3,7 +3,7 @@ This clause should either take appropriate action or contain a suitable comment as to why no action is taken.

            -
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +
          • DEPRECATED: Internal static code analysis checks will no longer be supported in future versions. Plug-in is able to import analysis reports from various external tools. Please consider using external code analyzers instead of deprecated internal ones.

          diff --git a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/TooManyParameters.html b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/TooManyParameters.html index 87b64232ea..de942f9f1f 100644 --- a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/TooManyParameters.html +++ b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/TooManyParameters.html @@ -3,7 +3,7 @@ Functions with many parameters are hard to test, maintain and reuse.

            -
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +
          • DEPRECATED: Internal static code analysis checks will no longer be supported in future versions. Plug-in is able to import analysis reports from various external tools. Please consider using external code analyzers instead of deprecated internal ones.
          diff --git a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/UnnamedNamespaceInHeader.html b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/UnnamedNamespaceInHeader.html index 290884b90e..2ae40b6bd8 100644 --- a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/UnnamedNamespaceInHeader.html +++ b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/UnnamedNamespaceInHeader.html @@ -1,6 +1,6 @@

          Unnamed namespaces in header files.

            -
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +
          • DEPRECATED: Internal static code analysis checks will no longer be supported in future versions. Plug-in is able to import analysis reports from various external tools. Please consider using external code analyzers instead of deprecated internal ones.

          The typical use of unnamed namespace is to hide module-internal diff --git a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/UseCorrectInclude.html b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/UseCorrectInclude.html index ec4fe73a6e..bbd81ac932 100644 --- a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/UseCorrectInclude.html +++ b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/UseCorrectInclude.html @@ -2,7 +2,7 @@ The #include directive shall only refer to predefined folders and therefore relative paths are not allowed.

            -
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +
          • DEPRECATED: Internal static code analysis checks will no longer be supported in future versions. Plug-in is able to import analysis reports from various external tools. Please consider using external code analyzers instead of deprecated internal ones.

          diff --git a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/UseCorrectType.html b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/UseCorrectType.html index 7fd86e8428..2ec787ecbe 100644 --- a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/UseCorrectType.html +++ b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/UseCorrectType.html @@ -3,7 +3,7 @@ C++ types shall be used instead.

            -
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +
          • DEPRECATED: Internal static code analysis checks will no longer be supported in future versions. Plug-in is able to import analysis reports from various external tools. Please consider using external code analyzers instead of deprecated internal ones.

          Avoid using the following types:

          diff --git a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/UselessParentheses.html b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/UselessParentheses.html index 298159c6a7..5df9893e32 100644 --- a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/UselessParentheses.html +++ b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/UselessParentheses.html @@ -2,7 +2,7 @@ Useless parentheses can sometimes be misleading and so should be removed.

            -
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +
          • DEPRECATED: Internal static code analysis checks will no longer be supported in future versions. Plug-in is able to import analysis reports from various external tools. Please consider using external code analyzers instead of deprecated internal ones.

          diff --git a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/UsingNamespaceInHeader.html b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/UsingNamespaceInHeader.html index d341e1a0d0..86b5eb61dc 100644 --- a/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/UsingNamespaceInHeader.html +++ b/sonar-cxx-plugin/src/main/resources/org/sonar/l10n/c++/rules/cxx/UsingNamespaceInHeader.html @@ -1,6 +1,6 @@

          Namespace directive in header files.

            -
          • DEPRECATED: Static code analysis checks will no longer be supported in future versions. Use an external tool for static code analysis instead.
          • +
          • DEPRECATED: Internal static code analysis checks will no longer be supported in future versions. Plug-in is able to import analysis reports from various external tools. Please consider using external code analyzers instead of deprecated internal ones.

          The using namespace directive imports names from the given