Skip to content
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

Fix bug with PipelineIndentationStyle.None where break instead of continue statement was used #1497

Merged
merged 7 commits into from Jun 11, 2020

Conversation

@bergmeister
Copy link
Collaborator

bergmeister commented May 13, 2020

PR Summary

Fixes #1496

Also added another test case that would've caught it.

PR Checklist

…tinue statement was used. TODO: Fix test that starts to fail because of this now
Christoph Bergmeister added 3 commits Jun 11, 2020
… into issue1496

# Conflicts:
#	Tests/Rules/UseConsistentIndentation.tests.ps1
Rules/UseConsistentIndentation.cs Show resolved Hide resolved
Rules/UseConsistentIndentation.cs Show resolved Hide resolved
Rules/UseConsistentIndentation.cs Outdated Show resolved Hide resolved
Rules/UseConsistentIndentation.cs Show resolved Hide resolved
bergmeister and others added 2 commits Jun 11, 2020
Co-authored-by: Robert Holt <rjmholt@gmail.com>
@bergmeister bergmeister merged commit 8e6182f into PowerShell:master Jun 11, 2020
3 checks passed
3 checks passed
PSScriptAnalyzer-CI #20200611.4 succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
license/cla All CLA requirements met.
Details
int searchLine;
do
{
searchLine = tokens[searchIndex].Extent.StartLineNumber;

This comment has been minimized.

@rjmholt

rjmholt Jun 11, 2020 Member

Oh! My switch suggestion got lost! Ugh, too much context switching... Anyway, not an issue

This comment has been minimized.

@bergmeister

bergmeister Jun 11, 2020 Author Collaborator

I thought I addressed your comment here by not initializing it: #1497 (comment)
Or did you mean a switch around tokens[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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants
You can’t perform that action at this time.