Skip to content

Commit efdfba9

Browse files
author
Kory Gill
committed
Improve post-build command, fix spelling mistakes.
1 parent 07f1f2b commit efdfba9

19 files changed

+141
-141
lines changed

Engine/Generic/AvoidCmdletGeneric.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic
2424
public abstract class AvoidCmdletGeneric : IScriptRule
2525
{
2626
/// <summary>
27-
/// AnalyzeScript: Analyzes the given Ast and returns DiagnosticRecords based on the anaylsis.
27+
/// AnalyzeScript: Analyzes the given Ast and returns DiagnosticRecords based on the analysis.
2828
/// </summary>
2929
/// <param name="ast">The script's ast</param>
3030
/// <param name="fileName">The name of the script file being analyzed</param>
@@ -38,7 +38,7 @@ public IEnumerable<DiagnosticRecord> AnalyzeScript(Ast ast, string fileName)
3838

3939
List<String> cmdletNameAndAliases = Microsoft.Windows.PowerShell.ScriptAnalyzer.Helper.Instance.CmdletNameAndAliases(GetCmdletName());
4040

41-
// Iterrates all CommandAsts and check the command name.
41+
// Iterates all CommandAsts and check the command name.
4242
foreach (CommandAst cmdAst in commandAsts)
4343
{
4444
if (cmdAst.GetCommandName() == null) continue;

Engine/Generic/AvoidParameterGeneric.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic
2323
public abstract class AvoidParameterGeneric : IScriptRule
2424
{
2525
/// <summary>
26-
/// AnalyzeScript: Analyzes the given Ast and returns DiagnosticRecords based on the anaylsis.
26+
/// AnalyzeScript: Analyzes the given Ast and returns DiagnosticRecords based on the analysis.
2727
/// </summary>
2828
/// <param name="ast">The script's ast</param>
2929
/// <param name="fileName">The name of the script file being analyzed</param>
@@ -35,7 +35,7 @@ public IEnumerable<DiagnosticRecord> AnalyzeScript(Ast ast, string fileName)
3535
// Finds all CommandAsts.
3636
IEnumerable<Ast> commandAsts = ast.FindAll(testAst => testAst is CommandAst, true);
3737

38-
// Iterrates all CommandAsts and check the condition.
38+
// Iterates all CommandAsts and check the condition.
3939
foreach (CommandAst cmdAst in commandAsts)
4040
{
4141
if (CommandCondition(cmdAst) && cmdAst.CommandElements != null)

Engine/Generic/ILogger.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public interface ILogger
3434
string GetName();
3535

3636
/// <summary>
37-
/// GetDescription: Retrives the description of the logger.
37+
/// GetDescription: Retrieves the description of the logger.
3838
/// </summary>
3939
/// <returns>The description of the logger</returns>
4040
string GetDescription();

Engine/Generic/IScriptRule.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic
2525
public interface IScriptRule : IRule
2626
{
2727
/// <summary>
28-
/// AnalyzeScript: Analyzes the given Ast and returns DiagnosticRecords based on the anaylsis.
28+
/// AnalyzeScript: Analyzes the given Ast and returns DiagnosticRecords based on the analysis.
2929
/// </summary>
3030
/// <param name="ast">The script's ast</param>
3131
/// <param name="fileName">The name of the script file being analyzed</param>

Engine/Generic/SourceType.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public enum SourceType : uint
2323
Builtin = 0,
2424

2525
/// <summary>
26-
/// MANAGED: Indicates the script analyzer rule is contirbuted as a managed rule.
26+
/// MANAGED: Indicates the script analyzer rule is contributed as a managed rule.
2727
/// </summary>
2828
Managed = 1,
2929

Engine/PSScriptAnalyzer.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ CompanyName = 'Microsoft Corporation'
2323
Copyright = '(c) Microsoft Corporation 2015. All rights reserved.'
2424

2525
# Description of the functionality provided by this module
26-
Description = 'PSScriptAnalyzer provides script analysis and checks for potential code defects in the scripts by applying a group of builtin or customized rules on the scripts being analyzed.'
26+
Description = 'PSScriptAnalyzer provides script analysis and checks for potential code defects in the scripts by applying a group of built-in or customized rules on the scripts being analyzed.'
2727

2828
# Minimum version of the Windows PowerShell engine required by this module
2929
PowerShellVersion = '5.0'

Engine/ScriptAnalyzer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,7 @@ public Dictionary<string, List<string>> CheckRuleExtension(string[] path, PathIn
888888
}
889889
}
890890

891-
// Resloves relative paths.
891+
// Resolves relative paths.
892892
try
893893
{
894894
for (int i = 0; i < validModPaths.Count; i++)

Engine/VariableAnalysis.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ private void ProcessParameters(IEnumerable<ParameterAst> parameters)
133133
}
134134

135135
/// <summary>
136-
/// Used to analyze scriptbloct, functionmemberast or functiondefinitionast
136+
/// Used to analyze scriptblock, functionmemberast or functiondefinitionast
137137
/// </summary>
138138
/// <param name="ast"></param>
139139
/// <returns></returns>

Engine/VariableAnalysisBase.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ internal static Block[] SetDominators(Block entry, List<Block> Blocks)
552552

553553
Block dom = block._predecessors[0];
554554

555-
// Get first proccessed node
555+
// Get first processed node
556556
foreach (var pred in block._predecessors)
557557
{
558558
if (dominators[pred.PostOrder] != null)
@@ -828,14 +828,14 @@ internal static Tuple<Dictionary<string, VariableAnalysisDetails>, Dictionary<st
828828
}
829829
}
830830

831-
// Initialize variables in internaldictionary to undetermined
831+
// Initialize variables in internal dictionary to undetermined
832832
foreach (var key in InternalVariablesDictionary.Keys.ToList())
833833
{
834834
InternalVariablesDictionary[key].Constant = Undetermined.UndeterminedConstant;
835835
InternalVariablesDictionary[key].Type = typeof(Undetermined);
836836
}
837837

838-
// Initialze DefinedBlock of phi function. If it is null then that phi function is not initialized;
838+
// Initialize DefinedBlock of phi function. If it is null then that phi function is not initialized;
839839
foreach (var block in blocks)
840840
{
841841
foreach (var phi in block.Phis)
@@ -956,7 +956,7 @@ internal static Tuple<Dictionary<string, VariableAnalysisDetails>, Dictionary<st
956956
{
957957
CommandExpressionAst cmeAst = assigned._rightAst as CommandExpressionAst;
958958
MemberExpressionAst memAst = (cmeAst != null) ? (cmeAst.Expression as MemberExpressionAst) : null;
959-
// Don't handle the this case because this is handled in assignmenttarget
959+
// Don't handle the this case because this is handled in assignment target
960960

961961
if (memAst != null && memAst.Expression is VariableExpressionAst)
962962
{
@@ -2042,7 +2042,7 @@ public object VisitNamedAttributeArgument(NamedAttributeArgumentAst namedAttribu
20422042
/// <returns></returns>
20432043
public object VisitParameter(ParameterAst parameterAst)
20442044
{
2045-
// Nothing to do now, we've already allocated parameters in the first pass looking for all variable naems.
2045+
// Nothing to do now, we've already allocated parameters in the first pass looking for all variable names.
20462046
System.Diagnostics.Debug.Assert(false, "Code is unreachable");
20472047
return null;
20482048
}
@@ -2812,7 +2812,7 @@ public object VisitBinaryExpression(BinaryExpressionAst binaryExpressionAst)
28122812
// left operand is always evaluated, visit it's expression in the current block.
28132813
binaryExpressionAst.Left.Visit(this.Decorator);
28142814

2815-
// The right operand is condtionally evaluated. We aren't generating any code here, just
2815+
// The right operand is conditionally evaluated. We aren't generating any code here, just
28162816
// modeling the flow graph, so we just visit the right operand in a new block, and have
28172817
// both the current and new blocks both flow to a post-expression block.
28182818
var targetBlock = new Block();

Engine/about_PSScriptAnalyzer.help.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ RUNNING SCRIPT ANALYZER ON AN EXISTING SCRIPT, MODULE OR DSC RESOURCE
8888
see if the output is "manageable". If it isn't, then you will want to "ease
8989
into" things by starting with the most serious violations first - errors.
9090

91-
You may be temtped to use the Invoke-ScriptAnalyzer command's Severity
91+
You may be tempted to use the Invoke-ScriptAnalyzer command's Severity
9292
parameter with the argument Error to do this - don't. This will run every
9393
built-in rule and then filter the results during output. The more rules the
9494
script analyzer runs, the longer it will take to analyze a file. You can

0 commit comments

Comments
 (0)