File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -29,12 +29,15 @@ public class UseCompatibleSyntax : ConfigurableRule
29
29
30
30
private static readonly Version s_v6 = new Version ( 6 , 0 ) ;
31
31
32
+ private static readonly Version s_v7 = new Version ( 7 , 0 ) ;
33
+
32
34
private static readonly IReadOnlyList < Version > s_targetableVersions = new [ ]
33
35
{
34
36
s_v3 ,
35
37
s_v4 ,
36
38
s_v5 ,
37
- s_v6
39
+ s_v6 ,
40
+ s_v7 ,
38
41
} ;
39
42
40
43
/// <summary>
@@ -123,7 +126,7 @@ private static HashSet<Version> GetTargetedVersions(string[] versionSettings)
123
126
{
124
127
if ( versionSettings == null || versionSettings . Length <= 0 )
125
128
{
126
- return new HashSet < Version > ( ) { s_v5 , s_v6 } ;
129
+ return new HashSet < Version > ( ) { s_v5 , s_v6 , s_v7 } ;
127
130
}
128
131
129
132
var targetVersions = new HashSet < Version > ( ) ;
@@ -278,7 +281,7 @@ public override AstVisitAction VisitFunctionDefinition(FunctionDefinitionAst fun
278
281
{
279
282
// Look for PowerShell workflows in the script
280
283
281
- if ( ! _targetVersions . Contains ( s_v6 ) )
284
+ if ( ! ( _targetVersions . Contains ( s_v6 ) || _targetVersions . Contains ( s_v7 ) ) )
282
285
{
283
286
return AstVisitAction . Continue ;
284
287
}
You can’t perform that action at this time.
0 commit comments