-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔧 Configure PSScriptAnalyzer for the project #5
- Added the following settings files to the root folder: + `PSScriptAnalyzerSettings.psd1` + `PSScriptAnalyzerSettings.desktop-3.0-windows.psd1` - Enabled `PSUseCompatibleCmdlets` and `PSUseCompatibleSyntax` rules to ensure the scripts are compatible with the target PowerShell version + `PSScriptAnalyzerSettings.psd1`: PowerShell 2.0 or higher + `...desktop-3.0-windows.psd1`: PowerShell 3.0 to 5.0 desktop version Fixes [#5](#5)
- Loading branch information
1 parent
130d6b0
commit fe1c919
Showing
2 changed files
with
46 additions
and
0 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,22 @@ | ||
@{ | ||
Severity = @('Error', 'Warning') | ||
Rules = @{ | ||
PSUseCompatibleCmdlets = @{ | ||
Compatibility = @( | ||
'desktop-3.0-windows' | ||
'desktop-4.0-windows' | ||
'desktop-5.1.14393.206-windows' | ||
) | ||
} | ||
PSUseCompatibleSyntax = @{ | ||
TargetedVersions = @( | ||
'6.0' | ||
'5.1' | ||
'4.0' | ||
'3.0' | ||
'2.0' | ||
) | ||
} | ||
} | ||
ExcludeRules = @('PSAvoidUsingWriteHost') | ||
} |
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,24 @@ | ||
@{ | ||
Severity = @('Error', 'Warning') | ||
Rules = @{ | ||
PSUseCompatibleCmdlets = @{ | ||
Compatibility = @( | ||
'desktop-2.0-windows' | ||
'desktop-3.0-windows' | ||
'desktop-4.0-windows' | ||
'desktop-5.1.14393.206-windows' | ||
'core-6.1.0-windows' | ||
) | ||
} | ||
PSUseCompatibleSyntax = @{ | ||
TargetedVersions = @( | ||
'6.0' | ||
'5.1' | ||
'4.0' | ||
'3.0' | ||
'2.0' | ||
) | ||
} | ||
} | ||
ExcludeRules = @('PSAvoidUsingWriteHost') | ||
} |