Uploaded image for project: 'SonarJava'
  1. SonarJava
  2. SONARJAVA-2717

FP on S128 Fallthrough pattern comment can be improved

    Details

    • Type: False-Positive
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.3
    • Component/s: Rules
    • Labels:
      None

      Description

      Implementation of RSPEC-128 ignores missing break in cases when a "fallthrough" comment is present in the case block.
      However it seems the pattern used to recognize these comments could be improved.
      There is quite a few comments in the form

      case 1:
        doSomething(); // fall through
      case 2:
        doAnotherThing();
      

      which raise an issue.
      Extend the pattern to take care of these cases as well

        Attachments

          Activity

            People

            • Assignee:
              christophe.zurn Christophe Zurn
              Reporter:
              christophe.zurn Christophe Zurn
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved: