File tree Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Original file line number Diff line number Diff line change 1
- # UseCompatibleCommands
1
+ # UseCompatibleTypes
2
2
3
3
** Severity Level: Warning**
4
4
@@ -88,4 +88,24 @@ An example configuration might look like:
88
88
}
89
89
}
90
90
}
91
- ```
91
+ ```
92
+
93
+ Alternatively, you could provide a settings object as follows:
94
+
95
+ ``` PowerShell
96
+ PS> $settings = @{
97
+ Rules = @{
98
+ PSUseCompatibleTypes = @{
99
+ Enable = $true
100
+ TargetProfiles = @("win-48_x64_10.0.17763.0_5.1.17763.316_x64_4.0.30319.42000_framework")
101
+ }
102
+ }
103
+ }
104
+ PS> Invoke-ScriptAnalyzer -Settings $settings -ScriptDefinition '[System.Management.Automation.SemanticVersion]"1.18.0-rc1"'
105
+
106
+ RuleName Severity ScriptName Line Message
107
+ -------- -------- ---------- ---- -------
108
+ PSUseCompatibleTypes Warning 1 The type 'System.Management.Automation.SemanticVersion' is
109
+ not available by default in PowerShell version
110
+ '5.1.17763.316' on platform 'Microsoft Windows 10 Pro'
111
+ ```
You can’t perform that action at this time.
0 commit comments