Skip to content

Commit bdf9c5b

Browse files
Fix CommentHelp for when a function has other problems with it (#1216)
* Fix CommentHelp for when a function has other problems with it * add CL entry
1 parent bf474c2 commit bdf9c5b

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
Fix intellisense and `F5` not working after debugging.
1818
- 🐛🧰 [vscode-PowerShell #2495](https://github.com/PowerShell/PowerShellEditorServices/pull/1211) -
1919
Fix PowerShellEditorServices.Commands module commands not working due to types being moved.
20+
- 🐛👮 [vscode-PowerShell #2516](https://github.com/PowerShell/PowerShellEditorServices/pull/1216) -
21+
Fix CommentHelp for when a function has other problems with it.
2022

2123
## v2.0.0-preview.9
2224
### Thursday, February 20, 2020

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)