Uploaded image for project: 'Java'
  1. Java
  2. SONARJAVA-19

@SuppressWarnings("all") no longer works in Sonar 3.3+

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.1
    • Fix Version/s: 1.3
    • Component/s: Squid
    • Labels:
      None
    • Environment:
      sonar 3.3. running on redhat linux

      Description

      @SuppressWarnings("all") is ignored on (some?) rule checks:

      Example code:

      @SuppressWarnings("all")
      @Override
      protected void finalize() throws Throwable {
      // make NOOP
      }

      Sonar reports this as below. Should have been ignored by Sonar according to docs.

      "Bad practice - Finalizer nullifies superclass finalizer "

        Activity

        Hide
        ylangisc Yves Langisch added a comment - - edited

        I can confirm that it happens with 3.3.1 but it didn't with 3.2. In my case it's with this rule --> checkstyle : com.puppycrawl.tools.checkstyle.checks.design.VisibilityModifierCheck.

        Hope to see a fix for this regression in the next release.

        Show
        ylangisc Yves Langisch added a comment - - edited I can confirm that it happens with 3.3.1 but it didn't with 3.2. In my case it's with this rule --> checkstyle : com.puppycrawl.tools.checkstyle.checks.design.VisibilityModifierCheck. Hope to see a fix for this regression in the next release.
        Hide
        gustavoc Gustavo Concon added a comment -

        For me is not working too. Version 3.3.2.

        Rules like Cyclomatic Complexity still raising after @SupressWarnings("all") on class or method.

        Show
        gustavoc Gustavo Concon added a comment - For me is not working too. Version 3.3.2. Rules like Cyclomatic Complexity still raising after @SupressWarnings("all") on class or method.
        Hide
        fhperuchi Fabio Peruchi added a comment -

        For me the @SuppresWarnings("all") is not working too. Version 3.3.2.

        Show
        fhperuchi Fabio Peruchi added a comment - For me the @SuppresWarnings("all") is not working too. Version 3.3.2.
        Hide
        rmarpozo Ruben Martin Pozo added a comment -

        @SuppressWarnings("all") is not working for some checkstyle rules, such as, Visibility Modifier or Cyclomatic Complexity. It does work in eclipse plugin though.

        I'm using Sonar 3.5.1 version

        Show
        rmarpozo Ruben Martin Pozo added a comment - @SuppressWarnings("all") is not working for some checkstyle rules, such as, Visibility Modifier or Cyclomatic Complexity. It does work in eclipse plugin though. I'm using Sonar 3.5.1 version
        Hide
        godin OLD - Evgeny Mandrikov added a comment -

        SONARJAVA-19.zip can be used to verify this ticket.

        Show
        godin OLD - Evgeny Mandrikov added a comment - SONARJAVA-19.zip can be used to verify this ticket.
        Hide
        fabemn OLD - Fabrice Bellingard added a comment -

        Tested!

        Show
        fabemn OLD - Fabrice Bellingard added a comment - Tested!
        Hide
        godin OLD - Evgeny Mandrikov added a comment -

        Integration test added.

        Show
        godin OLD - Evgeny Mandrikov added a comment - Integration test added.

          People

          • Assignee:
            godin OLD - Evgeny Mandrikov
            Reporter:
            frodec F Carlsen
          • Votes:
            5 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: