Skip to content

Resolve spotbugs suppression for UnusedLocalVariableCheck #14894

@romani

Description

@romani

see details #13543 (comment)
we merged such update only become it is Exception during Checkstyle runtime that block all other validations.

But code is weird as getBlockContainingLocalAnonInnerClass care about LAMBDA , but not all AnonClasses are Lambdas.

suggestion to use: rdiachenko@becac62 or any other fix.

expected result: no suppressions for pitest.
no suppression to:

  <Match>
    <!-- variable is just being saved for further analysis and isn't the main decider
         of the loop if it is done or not -->
    <Class name="com.puppycrawl.tools.checkstyle.checks.coding.UnusedLocalVariableCheck"/>
    <Method name="getBlockContainingLocalAnonInnerClass"/>
    <Bug pattern="SLS_SUSPICIOUS_LOOP_SEARCH"/>
  </Match>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions