-
-
Notifications
You must be signed in to change notification settings - Fork 105
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
Fixing indentation issues with conditionals inside initializers #534
Changes from all commits
255ea68
223b603
636b529
cc53934
16a7cae
51ab1ad
35bfdea
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,4 +82,4 @@ if ($firstRun) { | |
Write-Output $newPr | ||
} | ||
|
||
Pop-Location | ||
Set-Location $repositoryRoot |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -141,6 +141,27 @@ class ClassName | |
new Thing { One = 1 }, | ||
Two = 2 | ||
}; | ||
|
||
var conditionalsAndInvocations = new List<SomeObject> | ||
{ | ||
this.CallSomeMethod________________________________________() | ||
.CallSomeMethod________________________________________() | ||
? one | ||
: two, | ||
SomeOtherMethod(), | ||
SomethingElse | ||
.CallSomeMethod________________________________________() | ||
.CallSomeMethod________________________________________() | ||
? one | ||
: two, | ||
SomeOtherMethod(), | ||
this.CallSomeMethod________________________________________() | ||
.CallSomeMethod________________________________________(), | ||
someLongCondition___________________________________ | ||
&& someLongCondition___________________________________ | ||
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. Why did we decide not to indent binary operators, again? 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. In this case if it were indented, then it would line up with the ? someLongCondition___________________________________
&& someLongCondition___________________________________
? one
: two
someLongCondition___________________________________
&& someLongCondition___________________________________
? one
: two
someLongCondition___________________________________
&& someLongCondition___________________________________
? one
: two |
||
? one | ||
: two | ||
}; | ||
} | ||
|
||
private SomeObject someObject = | ||
|
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.
Damn, this whole block looks really good ✨