-
Notifications
You must be signed in to change notification settings - Fork 39
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
Bugfix. EMPTY_BLOCK_STRUCTURE_ERROR shouldn't trigger on empty lambdas #803
Merged
Merged
Changes from 2 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
727aff3
bugfix/empty-lambdas(#796)
aktsay6 71aa406
bugfix/empty-lambdas(#796)
aktsay6 cff24e6
bugfix/empty-lambdas(#796)
aktsay6 430b0bd
bugfix/empty-lambdas(#796)
aktsay6 bceb7be
bugfix/empty-lambdas(#796)
aktsay6 cda1e91
bugfix/empty-lambdas(#796)
aktsay6 14bbcb9
bugfix/empty-lambdas(#796)
aktsay6 6c759e4
bugfix/empty-lambdas(#796)
aktsay6 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,4 +1,4 @@ | ||||||
# <a name="c3"></a>3. General formatting (typesetting) | ||||||
__# <a name="c3"></a>3. General formatting (typesetting) | ||||||
<!-- =============================================================================== --> | ||||||
### <a name="c3.1"></a> 3.1 File-related rules | ||||||
This section describes the rules related to using files in your code. | ||||||
|
@@ -305,7 +305,7 @@ class A | |||||
Avoid empty blocks, and ensure braces start on a new line. An empty code block can be closed immediately on the same line and the next line. However, a newline is recommended between opening and closing braces `{}` (see the examples below.) | ||||||
|
||||||
Generally, empty code blocks are prohibited; using them is considered a bad practice (especially for catch block). | ||||||
They are only appropriate for overridden functions when the base class's functionality is not needed in the class-inheritor. | ||||||
They are appropriate for overridden functions, when the base class's functionality is not needed in the class-inheritor, for lambdas used as a function and for empty function in implementation of functional interface. | ||||||
```kotlin | ||||||
override fun foo() { | ||||||
} | ||||||
|
@@ -318,6 +318,8 @@ fun doNothing() {} | |||||
|
||||||
fun doNothingElse() { | ||||||
} | ||||||
|
||||||
fun foo(bar: () -> Unit = {})__ | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
``` | ||||||
|
||||||
**Invalid examples:** | ||||||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this underscore?