Skip to content

Commit c2d90e7

Browse files
author
Christoph Bergmeister
committed
Revert "Add PS 7 to UseCompatibleSyntax (PowerShell#1331)"
This reverts commit 1202f4e.
1 parent 1202f4e commit c2d90e7

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

Rules/CompatibilityRules/UseCompatibleSyntax.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,12 @@ public class UseCompatibleSyntax : ConfigurableRule
2929

3030
private static readonly Version s_v6 = new Version(6,0);
3131

32-
private static readonly Version s_v7 = new Version(7,0);
33-
3432
private static readonly IReadOnlyList<Version> s_targetableVersions = new []
3533
{
3634
s_v3,
3735
s_v4,
3836
s_v5,
39-
s_v6,
40-
s_v7,
37+
s_v6
4138
};
4239

4340
/// <summary>
@@ -126,7 +123,7 @@ private static HashSet<Version> GetTargetedVersions(string[] versionSettings)
126123
{
127124
if (versionSettings == null || versionSettings.Length <= 0)
128125
{
129-
return new HashSet<Version>(){ s_v5, s_v6, s_v7 };
126+
return new HashSet<Version>(){ s_v5, s_v6 };
130127
}
131128

132129
var targetVersions = new HashSet<Version>();
@@ -281,7 +278,7 @@ public override AstVisitAction VisitFunctionDefinition(FunctionDefinitionAst fun
281278
{
282279
// Look for PowerShell workflows in the script
283280

284-
if (!(_targetVersions.Contains(s_v6) || _targetVersions.Contains(s_v7)))
281+
if (!_targetVersions.Contains(s_v6))
285282
{
286283
return AstVisitAction.Continue;
287284
}

0 commit comments

Comments
 (0)