linter
linter copied to clipboard
Flag possible missing else in consecutive if statements
if (getCheckedOrSelected(aFrame, !isCheckbox)) {
inputState = CHECKED;
} if (isCheckbox && getIndeterminate(aFrame)) {
inputState = INDETERMINATE;
}
Frankly, I'm not sure how strongly we could believe this hint, but basically when there are two if statements next to each other that can both be true and they both mutate the same variable in different ways, it's strange. A good additional clue would be the missing newline before the second if statement but I'm not sure if analyzer has access to whitespace info.
dartfmt might help here.