GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||
GeezerVison is showing github.com — Fix edge case of PSUseConsistentIndentation for non-default value (IncreaseIndentationForFirstPipeline/IncreaseIndentationAfterEveryPipeline) by bergmeister · Pull Request #1423 · PowerShell/PSScriptAnalyzer Conversation
|
| DiagnosticRecord = $violations[0] | ||
| CorrectionsCount = 1 | ||
| ViolationText = "baz" | ||
| CorrectionText = (New-Object -TypeName String -ArgumentList $indentationUnit, ($indentationSize * 1)) + 'baz' |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
this could also be written without using New-Object:
CorrectionText = ($indentationUnit * $indentationSize) + 'baz'
it's sort of a toss up as to which one is more readable
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Good idea, thanks, I applied it, I could even remove the parenthesis because multiplication takes precedence over addition
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
PSUseConsistentIndentation: Identation missing if command was broken over multiple lines
There was an error while loading. Please reload this page.