[linter] adding unnecessary_statements to the "recommended rule set" #59732
Closed
Description
void bar() {
print('hello world');
}
void main() {
/// a lot of code
bar;
/// a lot of code
}
I was debugging and could not figure out why my code wasn't working and why I wasn't breaking in bar
...
Can we have a linter to detect this kind of statement: functionName;
?
From my understanding, these types of statements are not doing anything.
The author probably meats functionName();
if it wasn't passed to anything.