Skip to content

Commit fdb70bd

Browse files
author
Kapil Borle
committed
Create external diagnostic record with file path
While creating diagnostic record for PowerShell based external rule violations, the engine would pass file name instead of path for initializing the record. This would lead the ScriptPath and ScriptName property to be identical for external rule violations.
1 parent bd7c1b1 commit fdb70bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Engine/ScriptAnalyzer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1993,7 +1993,7 @@ public IEnumerable<DiagnosticRecord> AnalyzeSyntaxTree(
19931993
}
19941994
}
19951995

1996-
foreach (var ruleRecord in this.GetExternalRecord(scriptAst, scriptTokens, exRules.ToArray(), fileName))
1996+
foreach (var ruleRecord in this.GetExternalRecord(scriptAst, scriptTokens, exRules.ToArray(), filePath))
19971997
{
19981998
var records = SuppressRule(ruleSuppressions, ruleRecord);
19991999
foreach (var record in records.Item2)

0 commit comments

Comments
 (0)