Skip to content

Commit 14e7292

Browse files
Fix CommentHelp for when a function has other problems with it
1 parent 678b79b commit 14e7292

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

src/PowerShellEditorServices/Services/Analysis/AnalysisService.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -490,8 +490,8 @@ private static Hashtable GetCommentHelpRuleSettings(string helpLocation, bool fo
490490
{ "BlockComment", forBlockComment },
491491
{ "VSCodeSnippetCorrection", true },
492492
{ "Placement", helpLocation }}
493-
}}
494-
}};
493+
}}},
494+
{ "IncludeRules", "PSProvideCommentHelp" }};
495495
}
496496

497497
#region IDisposable Support
@@ -505,7 +505,7 @@ protected virtual void Dispose(bool disposing)
505505
{
506506
if (_analysisEngineLazy != null
507507
&& _analysisEngineLazy.IsValueCreated)
508-
{
508+
{
509509
_analysisEngineLazy.Value.Dispose();
510510
}
511511

test/PowerShellEditorServices.Test.E2E/LanguageServerProtocolMessageTests.cs

+6-2
Original file line numberDiff line numberDiff line change
@@ -809,9 +809,13 @@ public async Task CanSendGetCommentHelpRequest()
809809
string scriptPath = NewTestFile(@"
810810
function CanSendGetCommentHelpRequest {
811811
param(
812-
[string]
813-
$myParam
812+
$myParam,
813+
$myOtherParam,
814+
$yetAnotherParam
814815
)
816+
817+
# Include other problematic code to make sure this still works
818+
gci
815819
}
816820
");
817821

0 commit comments

Comments
 (0)