SonarQube Plugins
  1. SonarQube Plugins
  2. SONARPLUGINS-3175

The Toxicity plugin relies on some deprecated Checkstyle rules

    Details

    • Type: Improvement Improvement
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Toxicity Chart
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Would be better to base this chart on non-deprecated rules or optionally to make it possible to configure those base rules.

        Activity

        Hide
        Cezar Coca added a comment -

        Modified the Toxicity Plugin to compute the chart using the new rules from Squid repository. The mapping between old deprecated Checkstyle rules and the new recommended rules is depicted below:

        Anon Inner Length -> S1188
        Boolean Expression Complexity -> S1067
        Cyclomatic Complexity -> MethodCyclomaticComplexity
        File Length -> S00104
        Method Length -> S138
        Missing Switch Default -> SwitchLastCaseIsDefaultCheck
        Nested If Depth -> S134
        Nested Try Depth -> S1141
        Parameter Number -> S00107
        Class Fan Out Complexity -> S1200

        Show
        Cezar Coca added a comment - Modified the Toxicity Plugin to compute the chart using the new rules from Squid repository. The mapping between old deprecated Checkstyle rules and the new recommended rules is depicted below: Anon Inner Length -> S1188 Boolean Expression Complexity -> S1067 Cyclomatic Complexity -> MethodCyclomaticComplexity File Length -> S00104 Method Length -> S138 Missing Switch Default -> SwitchLastCaseIsDefaultCheck Nested If Depth -> S134 Nested Try Depth -> S1141 Parameter Number -> S00107 Class Fan Out Complexity -> S1200
        Hide
        G. Ann Campbell added a comment -

        I'd consider both: set the defaults to non-deprecated rules & allow configuration.

        Show
        G. Ann Campbell added a comment - I'd consider both: set the defaults to non-deprecated rules & allow configuration.
        Hide
        Cezar Coca added a comment - - edited

        The deprecated Checkstyle rules are still supported by Toxicity Chart Plugin.

        The configuration of which rules to apply is made in "Sonar Quality Profile" screen - if we would like to use the Checkstyle rules, than this rules should be activated. However, we highly recommend the usage of the new Squid rules (activate them in the "Quality Profile" associated with the under analysis project).

        It is worth to say that the deprecated Checkstyle rules are inactive by default.

        Show
        Cezar Coca added a comment - - edited The deprecated Checkstyle rules are still supported by Toxicity Chart Plugin. The configuration of which rules to apply is made in "Sonar Quality Profile" screen - if we would like to use the Checkstyle rules, than this rules should be activated. However, we highly recommend the usage of the new Squid rules (activate them in the "Quality Profile" associated with the under analysis project). It is worth to say that the deprecated Checkstyle rules are inactive by default.

          People

          • Assignee:
            Cezar Coca
            Reporter:
            Freddy Mallet
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: