Properly format expressions wrapped *before* a binary operator#1486
Merged
0x6675636b796f75676974687562 merged 2 commits intomasterfrom Jul 29, 2022
Merged
Conversation
### What's done: * Now, the indentation in binary expressions wrapped *before* a binary operator or an infix function is also controlled with `extendedIndentAfterOperators`. * The above is also true for `as` and `as?` operators. * The only exclusion is the Elvis operator (`?:`). * Fixes #1340.
Codecov Report
@@ Coverage Diff @@
## master #1486 +/- ##
============================================
- Coverage 82.96% 82.96% -0.01%
Complexity 2579 2579
============================================
Files 111 111
Lines 7708 7712 +4
Branches 2111 2114 +3
============================================
+ Hits 6395 6398 +3
Misses 418 418
- Partials 895 896 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Contributor
orchestr7
approved these changes
Jul 29, 2022
Contributor
orchestr7
reviewed
Jul 29, 2022
| | 2 to | ||
| | 3)) | ||
| """.trimMargin(), | ||
|
|
Member
There was a problem hiding this comment.
Actually - I suggest to split resources - we don't need to have huge unit tests that have complex logic (especially when warnings are far away from the code)
orchestr7
reviewed
Jul 29, 2022
| softly.assertThat(lintResult(code, customConfig.asRulesConfigList())) | ||
| .describedAs("lint result for ${code.describe()}") | ||
| .isNotEmpty | ||
| .hasSizeBetween(1, 5).allSatisfy(Consumer { lintError -> |
Member
There was a problem hiding this comment.
expecting from 1 to 5 warnings :)
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What's done:
or an infix function is also controlled with
extendedIndentAfterOperators.asandas?operators.?:).WRONG_INDENTATION:extendedIndentAfterOperatorsignored if lines are wrapped before a binary operator or an infix function #1340.