@@ -83,8 +83,8 @@ The default profile directory is under the PSScriptAnalzyer module at
83
83
` $PSScriptRoot/PSCompatibilityCollector/profiles ` (where ` $PSScriptRoot ` here refers to the
84
84
directory containing ` PSScriptAnalyzer.psd1 ` ).
85
85
86
- The compatibility analysis compares a type used to both a target profile and a " union" profile
87
- (containing all types available in * any * profile in the profile dir). If a type is not present in
86
+ The compatibility analysis compares a type used to both a target profile and a ' union' profile
87
+ (containing all types available in _ any _ profile in the profile dir). If a type is not present in
88
88
the union profile, it is assumed to be locally created and ignored. Otherwise, if a type is present
89
89
in the union profile but not present in a target, it is deemed to be incompatible with that target.
90
90
@@ -127,11 +127,11 @@ PS> $settings = @{
127
127
Rules = @{
128
128
PSUseCompatibleTypes = @{
129
129
Enable = $true
130
- TargetProfiles = @(" win-48_x64_10.0.17763.0_5.1.17763.316_x64_4.0.30319.42000_framework" )
130
+ TargetProfiles = @(' win-48_x64_10.0.17763.0_5.1.17763.316_x64_4.0.30319.42000_framework' )
131
131
}
132
132
}
133
133
}
134
- PS> Invoke-ScriptAnalyzer -Settings $settings -ScriptDefinition '[System.Management.Automation.SemanticVersion]" 1.18.0-rc1" '
134
+ PS> Invoke-ScriptAnalyzer -Settings $settings -ScriptDefinition '[System.Management.Automation.SemanticVersion]' 1.18.0-rc1' '
135
135
136
136
RuleName Severity ScriptName Line Message
137
137
-------- -------- ---------- ---- -------
@@ -146,17 +146,17 @@ Command compatibility diagnostics can be suppressed with an attribute on the `pa
146
146
scriptblock as with other rules.
147
147
148
148
``` powershell
149
- [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute(" PSUseCompatibleTypes", "" )]
149
+ [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute(' PSUseCompatibleTypes', '' )]
150
150
```
151
151
152
152
The rule can also be suppressed only for particular types:
153
153
154
154
``` powershell
155
- [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute(" PSUseCompatibleTypes", " System.Management.Automation.Security.SystemPolicy" )]
155
+ [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute(' PSUseCompatibleTypes', ' System.Management.Automation.Security.SystemPolicy' )]
156
156
```
157
157
158
158
And also suppressed only for type members:
159
159
160
160
``` powershell
161
- [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute(" PSUseCompatibleCommands", " System.Management.Automation.LanguagePrimitives/ConvertTypeNameToPSTypeName" )]
161
+ [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute(' PSUseCompatibleCommands', ' System.Management.Automation.LanguagePrimitives/ConvertTypeNameToPSTypeName' )]
162
162
```
0 commit comments