Skip to content

Commit 036f164

Browse files
author
Kapil Borle
committed
Handles a null argument in UseToExportFieldsInManifest rule.
1 parent 961dd5e commit 036f164

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Rules/UseToExportFieldsInManifest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public IEnumerable<DiagnosticRecord> AnalyzeScript(Ast ast, string fileName)
4242
throw new ArgumentNullException(Strings.NullAstErrorMessage);
4343
}
4444

45-
if (!fileName.EndsWith(".psd1", StringComparison.OrdinalIgnoreCase))
45+
if (fileName == null || !fileName.EndsWith(".psd1", StringComparison.OrdinalIgnoreCase))
4646
{
4747
yield break;
4848
}

0 commit comments

Comments
 (0)