Repository navigation
Signaturehelp cancellation and some caching - #1251
TylerLeonhardt merged 6 commits into
Conversation
|
I could add logging when it reads from the cache but then I'd need to pass in the logger. |
| s_nounExclusionList.TryAdd("InstalledModule", true); | ||
| s_nounExclusionList.TryAdd("InstalledScript", true); | ||
| s_nounExclusionList.TryAdd("ScriptFileInfo", true); | ||
| s_nounExclusionList.TryAdd("PSRepository", true); |
There was a problem hiding this comment.
According to the comment on line 62, shouldn't PowerShellGet be in this list?
There was a problem hiding this comment.
Ah nevermind, this is the noun list, duh. Not the package name list.
There was a problem hiding this comment.
That said, I see more nouns from PowerShellGet 2.2.3 than appear in the list above. gcm -m PowerShellGet | % Noun | % Sort -uniq Is that a problem? For instance, there is a Find-Command function in PowerShellGet.
There was a problem hiding this comment.
Yeah I just renamed the variable. We should have a better check for verb-noun when PSGet uses the same noun as an inbox module Module as an example.
There was a problem hiding this comment.
I've added a s_cmdletExclusionList now which will handle that ^
Patrick Meinecke (SeeminglyScience)
left a comment
There was a problem hiding this comment.
Changes LGTM!
One thing in existing code to consider, definitely not blocking.
| { | ||
| signatures = new SignatureInformation[parameterSets.Signatures.Length]; | ||
| for (int i = 0; i < signatures.Length; i++) | ||
| var parameters = new ParameterInformation[parameterSets.Signatures[i].Parameters.Count()]; |
There was a problem hiding this comment.
Do we know why Parameters is typed as IEnumerable<>? I know this is existing code, but while you're here it might be worth changing that to an array and use Length here instead of Count().
If it's IEnumerable<> because it's a yield enumerator or LINQ then Count() should be skipped and a List<> with a best estimate capacity should be used.
There was a problem hiding this comment.
Not really sure what the best estimate could be here... so I'll just leave it empty.
| } | ||
|
|
||
| SignatureInformation[] signatures = new SignatureInformation[parameterSets.Signatures.Length]; | ||
| var signatures = new SignatureInformation[parameterSets.Signatures.Length]; |
|
Issues
======
+ Solved 1
Complexity increasing per file
==============================
- src/PowerShellEditorServices/Services/TextDocument/Handlers/SignatureHelpHandler.cs 1
- src/PowerShellEditorServices/Services/PowerShellContext/Utilities/CommandHelpers.cs 2
Clones added
============
- src/PowerShellEditorServices/Services/TextDocument/Handlers/SignatureHelpHandler.cs 1
See the complete overview on Codacy |
CmdletInfo's and synopsis' ofCmdletInfos.NounExclusionListtos_nounExclusionList