Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proposal: remove useless braces #4937

Open
stephane-archer opened this issue Apr 16, 2024 · 0 comments
Open

proposal: remove useless braces #4937

stephane-archer opened this issue Apr 16, 2024 · 0 comments

Comments

@stephane-archer
Copy link

in Dart adding too many braces by accident happens sometimes
while this is valid code, useless braces should be avoided

void bar() {
   log("hello");
}
void foo() {
   {
        bar();
   }
}

in this example, it's quite obvious but when the function is in a class with multiple levels of indentation it's quite hidden.
Here is an example in my code, the closing brace is way lower.
Screenshot 2024-04-16 at 17 45 39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant