question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Extend "remove braces from lambda expression" to any single expression block

See original GitHub issue
let x = { 92 };

=>

let x = 92;

cc @zjhmale #576

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
matkladcommented, Aug 26, 2016

Oups, sorry, I used the wrong wording. Quick fixes should indeed be fixes. But intentions can totally change the semantics (something like “filp ,” comes to mind).

1reaction
mkaputcommented, Aug 26, 2016

Fine, but this question has to be taken into account as user usually expects quick fixes to just work and not to mess up user’s code

Read more comments on GitHub >

github_iconTop Results From Across the Web

When are braces optional in Java 8 lambda syntax?
You may omit the braces when the lambda body is a single expression or a void method invocation. Every expression evaluates to a...
Read more >
Lambda Expressions and Functional Interfaces: Tips and Best ...
Braces and return statements are optional in one-line lambda bodies. This means that they can be omitted for clarity and conciseness. We can...
Read more >
Best practices when you use Lambda expressions in Java
A lambda expression is a block of code that can be passed around to execute. ... Braces and return statements are optional in...
Read more >
Roslynator/README.md at main - Analyzers - GitHub
Id Title Severity RCS1002 Remove braces None RCS1004 Remove braces from if‑else None RCS1005 Simplify nested using statement Hidden
Read more >
Parentheses should be removed from a single lambda input ...
Parentheses should be removed from a single lambda input parameter when its type is inferred ... There are two possible syntaxes for a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found