- Notifications
You must be signed in to change notification settings - Fork407
Fix bug with PipelineIndentationStyle.None where break instead of continue statement was used#1497
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…tinue statement was used. TODO: Fix test that starts to fail because of this now
… into issue1496# Conflicts:#Tests/Rules/UseConsistentIndentation.tests.ps1
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Robert Holt <rjmholt@gmail.com>
| intsearchLine; | ||
| do | ||
| { | ||
| searchLine=tokens[searchIndex].Extent.StartLineNumber; |
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.
Oh! Myswitch suggestion got lost! Ugh, too much context switching... Anyway, not an issue
bergmeisterJun 11, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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.
I thought I addressed your comment here by not initializing it:#1497 (comment)
Or did you mean a switch aroundtokens[searchIndex].Kind? I don't see too much value in it tbh. Switch statements don't look that much cleaner for simple cases like that IMHO because of their ceremony that requires additional indentation layer, break statements, etc..
Otherwise we can always create a follow up PR
Uh oh!
There was an error while loading.Please reload this page.
PR Summary
Fixes#1496
Also added another test case that would've caught it.
PR Checklist
.cs,.ps1and.psm1files have the correct copyright headerWIP:to the beginning of the title and remove the prefix when the PR is ready.