File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -116,7 +116,11 @@ public string GetDescription()
116
116
117
117
public string GetName ( )
118
118
{
119
- return string . Format ( CultureInfo . CurrentCulture , Strings . AvoidGlobalAliasesName ) ;
119
+ return string . Format (
120
+ CultureInfo . CurrentCulture ,
121
+ Strings . NameSpaceFormat ,
122
+ GetSourceName ( ) ,
123
+ Strings . AvoidGlobalAliasesName ) ;
120
124
}
121
125
122
126
public RuleSeverity GetSeverity ( )
Original file line number Diff line number Diff line change 1
1
Import-Module PSScriptAnalyzer
2
2
3
3
$AvoidGlobalAliasesError = " Avoid creating aliases with a Global scope."
4
- $violationName = " AvoidGlobalAliases "
4
+ $violationName = " PSAvoidGlobalAliases "
5
5
6
6
$directory = Split-Path - Parent $MyInvocation.MyCommand.Path
7
7
$violations = Invoke-ScriptAnalyzer $directory \AvoidGlobalAliases.psm1 | Where-Object {$_.RuleName -eq $violationName }
You can’t perform that action at this time.
0 commit comments