Uploaded image for project: 'SonarSlang'
  1. SonarSlang
  2. SONARSLANG-292

Constructor and "virtual" methods with empty body should not raise an issue.

    Details

    • Type: False-Positive
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: apex-iteration-3, 1.4
    • Component/s: None
    • Labels:
      None

      Description

      SONARSLANG-276 enable the rule S1186 (Methods should not be empty).

      As mention by Michael Gumowski this rule reports a lot of false positives, especially in two cases:

      • Constructor with empty body and empty list of parameter.
        They are excluded in SonarJava aswell, we could do the same here.
      • Virtual methods
        "Modifier that declares that this class allows extension and overrides."
        If this modifier can be compared to abstract, it should not raise an issue.

      However, there is no simple solution to this problem. Since this will probably requires modifications on SLang, an in-depth thinking to know if it makes sense to implements it is required.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                christophe.zurn Christophe Zurn
                Reporter:
                quentin.jaquier Quentin Jaquier
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: