Skip to content

Commit

Permalink
tweak extents in error message: for equal sign warnings, it will poin…
Browse files Browse the repository at this point in the history
…t to the equal sign (instead of the RHS only) and fore file redirections it will be the redirection ast (e.g. '> $b')
  • Loading branch information
bergmeister committed Feb 12, 2018
1 parent 4078e41 commit b7ad069
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Rules/PossibleIncorrectUsageOfAssignmentOperator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public IEnumerable<DiagnosticRecord> AnalyzeScript(Ast ast, string fileName)
if (assignmentStatementAst.Right.Extent.Text.StartsWith("="))
{
yield return new DiagnosticRecord(
Strings.PossibleIncorrectUsageOfComparisonOperatorAssignmentOperatorError, assignmentStatementAst.Extent,
Strings.PossibleIncorrectUsageOfComparisonOperatorAssignmentOperatorError, assignmentStatementAst.ErrorPosition,
GetName(), DiagnosticSeverity.Warning, fileName);
}
else
Expand All @@ -61,7 +61,7 @@ public IEnumerable<DiagnosticRecord> AnalyzeScript(Ast ast, string fileName)
if (commandAst == null)
{
yield return new DiagnosticRecord(
Strings.PossibleIncorrectUsageOfComparisonOperatorAssignmentOperatorError, assignmentStatementAst.Extent,
Strings.PossibleIncorrectUsageOfComparisonOperatorAssignmentOperatorError, assignmentStatementAst.ErrorPosition,
GetName(), DiagnosticSeverity.Information, fileName);
}
}
Expand Down

0 comments on commit b7ad069

Please sign in to comment.