charlescyt / pyramid_lint

Linting tool for Dart and Flutter projects.

Home Page:https://pub.dev/packages/pyramid_lint

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

avoid_nested_if lint showing for else if blocks also

imsamgarg opened this issue · comments

Is there an existing issue for this bug?

Bug Description

When we define multiple conditions using else if this lint is showing up.

image

From programmer's point of view they are not nested. But from the compiler's pov they are indeed nested. Is there any way by which we can handle this case?

Steps to Reproduce

Declare multiple else if blocks

  if (a == 1) {
  } else if (a == 2) {
  } else if (a == 3) {
  } else {}

Additional Information

No response

Sure. I will try to fix it today.