SonarQube Java
  1. SonarQube Java
  2. SONARJAVA-19

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

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major 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
    • Number of attachments :
      1

      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
        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
        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
        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
        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
        Fabio Peruchi added a comment -

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

        Show
        Fabio Peruchi added a comment - For me the @SuppresWarnings("all") is not working too. Version 3.3.2.
        Hide
        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
        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
        Evgeny Mandrikov added a comment -

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

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

        Tested!

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

        Integration test added.

        Show
        Evgeny Mandrikov added a comment - Integration test added.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: