Skip to content

[java] Deprecate AvoidDeeplyNestedIfStmts #3295

Open

Description

@oowekyala

Is your feature request related to a problem? Please describe.
The rule AvoidDeeplyNestedIfStmts feels really random compared to the several other complexity rules we have (CyclomaticComplexity, NPathComplexity, soon CognitiveComplexity #3293). There's no proper justification for how it works, it just cares about if statements (and not if/else statements, or nesting of other statements). I think it's really superfluous.

Edit: Also there is CollapsibleIfStatements which at least suggests a decent fix.

Describe the solution you'd like Deprecate and remove AvoidDeeplyNestedIfStmts. Hint at using one of the other complexity rules.

Describe alternatives you've considered find a satisfactory definition and justification for the rule, but this feels like a waste of time given the other existing rules.

Additional context

Activity

  1. added
    is:deprecation
    on May 24, 2021
  2. changed the title [-]Deprecate AvoidDeeplyNestedIfStmts[/-] [+][java] Deprecate AvoidDeeplyNestedIfStmts[/+] on May 24, 2021
  3. added this to the 6.54.0 milestone on Dec 31, 2022
  4. modified the milestones: 6.54.0, 7.x on Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    is:deprecation

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions