forked from chocolatey/ChocoCCM
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(chocolatey#67) Add PSSA linting to the repo
Initial pass for formatting existing scripts and adding the PSSA options to the repo for use in VS Code, and later the build process.
- Loading branch information
Showing
41 changed files
with
883 additions
and
969 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
@{ | ||
IncludeRules = @( | ||
'PSUseBOMForUnicodeEncodedFile', | ||
'PSMisleadingBacktick', | ||
'PSAvoidUsingCmdletAliases', | ||
'PSAvoidTrailingWhitespace', | ||
'PSAvoidSemicolonsAsLineTerminators', | ||
'PSUseCorrectCasing', | ||
'PSPlaceOpenBrace', | ||
'PSPlaceCloseBrace', | ||
'PSAlignAssignmentStatement', | ||
'PSUseConsistentWhitespace', | ||
'PSUseConsistentIndentation' | ||
) | ||
|
||
Rules = @{ | ||
|
||
<# | ||
PSAvoidUsingCmdletAliases = @{ | ||
'allowlist' = @('') | ||
}#> | ||
|
||
PSAvoidSemicolonsAsLineTerminators = @{ | ||
Enable = $true | ||
} | ||
|
||
PSUseCorrectCasing = @{ | ||
Enable = $true | ||
} | ||
|
||
PSPlaceOpenBrace = @{ | ||
Enable = $true | ||
OnSameLine = $true | ||
NewLineAfter = $true | ||
IgnoreOneLineBlock = $false | ||
} | ||
|
||
PSPlaceCloseBrace = @{ | ||
Enable = $true | ||
NewLineAfter = $true | ||
IgnoreOneLineBlock = $false | ||
NoEmptyLineBefore = $true | ||
} | ||
|
||
PSAlignAssignmentStatement = @{ | ||
Enable = $true | ||
CheckHashtable = $true | ||
} | ||
|
||
PSUseConsistentIndentation = @{ | ||
Enable = $true | ||
Kind = 'space' | ||
PipelineIndentation = 'IncreaseIndentationForFirstPipeline' | ||
IndentationSize = 4 | ||
} | ||
|
||
PSUseConsistentWhitespace = @{ | ||
Enable = $true | ||
CheckInnerBrace = $true | ||
CheckOpenBrace = $true | ||
CheckOpenParen = $true | ||
CheckOperator = $true | ||
CheckPipe = $true | ||
CheckPipeForRedundantWhitespace = $false | ||
CheckSeparator = $true | ||
CheckParameter = $false | ||
IgnoreAssignmentOperatorInsideHashTable = $true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Get-ChildItem .\Public\*.ps1 | % { . $_.Fullname } | ||
Get-ChildItem .\Public\*.ps1 | ForEach-Object { . $_.Fullname } |
Oops, something went wrong.