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

S1186 should not raise an issue when a single-line comment is on the same line as the empty method

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4
    • Component/s: Rules
    • Labels:
      None

      Description

      The implementation of RSPEC-1186 looks for a comment inside the empty block.
      However, it can happen that a single line function declaration is followed by a comment on the same line.
      We should avoid raising issues in such cases.

      Example (Scala):

      def f() = {} // no-op
      

        Attachments

          Activity

            People

            • Assignee:
              christophe.zurn Christophe Zurn
              Reporter:
              pierre-yves.nicolas Pierre-Yves Nicolas
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved: