Pattern: Inconsistent indentation
Issue: -
Indentation should be consistent throughout the source file.
Rules = @{
PSUseConsistentIndentation = @{
Enable = $true
IndentationSize = 4
PipelineIndentation = 'IncreaseIndentationForFirstPipeline'
Kind = 'space'
}
}
Enable or disable the rule during ScriptAnalyzer invocation.
Indentation size in the number of space characters.
Whether to increase indentation after a pipeline for multi-line statements. The settings are:
- IncreaseIndentationForFirstPipeline (default): Indent once after the first pipeline and keep this indentation. Example:
foo |
bar |
baz
- IncreaseIndentationAfterEveryPipeline: Indent more after the first pipeline and keep this indentation. Example:
foo |
bar |
baz
- NoIndentation: Do not increase indentation. Example:
foo |
bar |
baz
Represents the kind of indentation to be used. Possible values are: space
, tab
. If any invalid value is given, the property defaults to space
.
space
means IndentationSize
number of space
characters are used to provide one level of indentation.
tab
means a tab character, \t
.