Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions 4 Engine/Commands/InvokeScriptAnalyzerCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ public object Settings

private bool stopProcessing;

#if !PSV3
/// <summary>
/// Resolve DSC resource dependency
/// </summary>
Expand All @@ -238,7 +237,6 @@ public SwitchParameter SaveDscDependency
set { saveDscDependency = value; }
}
private bool saveDscDependency;
#endif // !PSV3

#if DEBUG
/// <summary>
Expand Down Expand Up @@ -387,7 +385,6 @@ protected override void ProcessRecord()
ProcessPath();
}

#if !PSV3
// TODO Support dependency resolution for analyzing script definitions
if (saveDscDependency)
{
Expand All @@ -407,7 +404,6 @@ protected override void ProcessRecord()
}
return;
}
#endif
ProcessInput();
}

Expand Down
6 changes: 0 additions & 6 deletions 6 Engine/FindAstPositionVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@ namespace Microsoft.Windows.PowerShell.ScriptAnalyzer
/// <summary>
/// Provides an efficient way to find the position in the AST corresponding to a given script position.
/// </summary>
#if !(PSV3 || PSV4)
internal class FindAstPositionVisitor : AstVisitor2
#else
internal class FindAstPositionVisitor : AstVisitor
#endif
{
private IScriptPosition searchPosition;

Expand Down Expand Up @@ -300,7 +296,6 @@ public override AstVisitAction VisitWhileStatement(WhileStatementAst whileStatem
return Visit(whileStatementAst);
}

#if !(PSV3 || PSV4)
public override AstVisitAction VisitBaseCtorInvokeMemberExpression(BaseCtorInvokeMemberExpressionAst baseCtorInvokeMemberExpressionAst)
{
return Visit(baseCtorInvokeMemberExpressionAst);
Expand Down Expand Up @@ -335,7 +330,6 @@ public override AstVisitAction VisitUsingStatement(UsingStatementAst usingStatem
{
return AstVisitAction.Continue;
}
#endif

#if !(NET462 || PSV7) // net462 includes V3,4,5
public override AstVisitAction VisitPipelineChain(PipelineChainAst pipelineChainAst)
Expand Down
4 changes: 0 additions & 4 deletions 4 Engine/Generic/IDSCResourceRule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ public interface IDSCResourceRule : IRule
/// <returns>The results of the analysis</returns>
IEnumerable<DiagnosticRecord> AnalyzeDSCResource(Ast ast, string fileName);

#if !PSV3

/// <summary>
/// Analyze dsc classes (if any) in the file
/// </summary>
Expand All @@ -29,7 +27,5 @@ public interface IDSCResourceRule : IRule
/// <returns></returns>
IEnumerable<DiagnosticRecord> AnalyzeDSCClass(Ast ast, string fileName);

#endif

}
}
4 changes: 1 addition & 3 deletions 4 Engine/Generic/ModuleDependencyHandler.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#if !PSV3
using System;
using System.Collections.Generic;
using System.IO;
Expand Down Expand Up @@ -519,5 +518,4 @@ public void Dispose()

#endregion Public Methods
}
}
#endif // !PSV3
}
2 changes: 0 additions & 2 deletions 2 Engine/Generic/RuleSuppression.cs
Original file line number Diff line number Diff line change
Expand Up @@ -333,12 +333,10 @@ public static List<RuleSuppression> GetSuppressions(IEnumerable<AttributeAst> at
{
targetAsts = scopeAst.FindAll(ast => ast is FunctionDefinitionAst && reg.IsMatch((ast as FunctionDefinitionAst).Name), true);
}
#if !(PSV3 || PSV4)
else if (scope.Equals("class", StringComparison.OrdinalIgnoreCase))
{
targetAsts = scopeAst.FindAll(ast => ast is TypeDefinitionAst && reg.IsMatch((ast as TypeDefinitionAst).Name), true);
}
#endif

if (targetAsts != null)
{
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.