-
Notifications
You must be signed in to change notification settings - Fork 1
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
OSOE-501: Enable further analyzer rules for better code styling control and more #20
Merged
Merged
Changes from 20 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
6fec06b
Disabling "Test Analysis Failure - NuGet PackageReference" step in th…
BenedekFarkas e7cdc28
Updating Invoke-Analyzer.ps1 to require PSScriptAnalyzer version 1.21…
BenedekFarkas e5b448e
Enabling a bunch of analyzer rules
BenedekFarkas 386a3c1
PSScriptAnalyzerSettings: "Paren" in PSUseConsistentWhitespace.CheckO…
BenedekFarkas 03046b4
PSScriptAnalyzerSettings: Setting PSUseConsistentWhitespace.CheckPara…
BenedekFarkas fc65ffc
Updating test-analysis-failure workflow to expect PSUseConsistentInde…
BenedekFarkas 8ec5ef1
Updating Violate-Analyzers and test-analysis-failure to check for PSA…
BenedekFarkas 01f8b64
Not enabling PSUseCorrectCasing yet due to https://github.com/PowerSh…
BenedekFarkas 11b5985
Attempting to dry the configuration for expected code analysis errors…
BenedekFarkas 8098721
Revert "Attempting to dry the configuration for expected code analysi…
BenedekFarkas 40d9fa3
Not ignoring Information-level analyzer violations anymore, but disab…
BenedekFarkas cb224ab
Fixing PSAvoidUsingDoubleQuotesForConstantString analyzer violations
BenedekFarkas 2de89bd
Updating Violate-Analyzers.ps1 to violate PSAvoidUsingDoubleQuotesFor…
BenedekFarkas 2c6226c
Adding PSAvoidUsingDoubleQuotesForConstantString to the list of expec…
BenedekFarkas 9d3723a
Update Lombiq.Analyzers.PowerShell/Rules/Measure-LineContinuation/Mea…
BenedekFarkas 8dc81e2
Updating the explanation of Violate-Analyzers.ps1
08e4d67
Fixing message formatting in Invoke-Invoke-Analyzer.ps1
BenedekFarkas d000ed3
Improved message formatting for variable assignment and defining the …
BenedekFarkas 32527c6
Merge remote-tracking branch 'origin/dev' into issue/OSOE-501
BenedekFarkas 21203aa
Re-enabling PSUseCorrectCasing analyzer rule, because https://github.…
BenedekFarkas a5b3d4a
Merge branch 'dev' into issue/OSOE-501
sarahelsaig 3feafe7
Revert temporary change.
sarahelsaig 95e3045
Revert "Revert temporary change."
sarahelsaig a378811
Update PackageReference version.
sarahelsaig 2fd7762
Revert temporary change.
sarahelsaig File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,8 +1,53 @@ | ||
@{ | ||
ExcludeRules = | ||
@( | ||
'PSDscExamplesPresent', | ||
'PSDscTestsPresent', | ||
'PSReturnCorrectTypesForDSCFunctions', | ||
'PSProvideCommentHelp', | ||
# This rule expects us to implement a feature we will be unlikely to use in the majority of cases. Although | ||
# ShouldProcess support should be implemented in cases where it makes sense. | ||
'PSUseShouldProcessForStateChangingFunctions' | ||
) | ||
Rules = @{ | ||
PSAvoidSemicolonsAsLineTerminators = @{ | ||
Enable = $true | ||
} | ||
PSAvoidUsingDoubleQuotesForConstantString = @{ | ||
Enable = $true | ||
} | ||
PSPlaceCloseBrace = @{ | ||
Enable = $true | ||
IgnoreOneLineBlock = $true | ||
NewLineAfter = $true | ||
NoEmptyLineBefore = $false | ||
} | ||
PSPlaceOpenBrace = @{ | ||
Enable = $true | ||
IgnoreOneLineBlock = $true | ||
NewLineAfter = $true | ||
OnSameLine = $false | ||
} | ||
PSUseConsistentIndentation = @{ | ||
Enable = $true | ||
IndentationSize = 4 | ||
PipelineIndentation = 'IncreaseIndentationForFirstPipeline' | ||
Kind = 'space' | ||
} | ||
PSUseConsistentWhitespace = @{ | ||
Enable = $true | ||
CheckInnerBrace = $true | ||
CheckOpenBrace = $true | ||
CheckOpenParen = $true | ||
CheckOperator = $true | ||
CheckPipe = $true | ||
CheckPipeForRedundantWhitespace = $true | ||
CheckSeparator = $true | ||
CheckParameter = $false | ||
IgnoreAssignmentOperatorInsideHashTable = $false | ||
} | ||
PSUseCorrectCasing = @{ | ||
Enable = $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
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,9 +1,9 @@ | ||
function Violate-Analyzers() | ||
{ | ||
"This file is intended to verify that PSScriptAnalyzer works and contains intentionally bad code." | ||
Write-Host 'This file contains intentionally bad code to verify that PSScriptAnalyzer works correctly.' | ||
} | ||
|
||
try { Violate-Analyzers } catch { } | ||
|
||
"Lombiq", ` | ||
"Orchard", "Hastlayer" | % { $_ } | ||
'Orchard', 'Hastlayer' | % { $_ } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Temporary change to be reverted later.