The Problem
Currently, Perl Navigator appears to "sanitize" or truncate the output from perlcritic before displaying it in the VS Code hover and Problems tab. While core Perl pragmas (like strict) render full documentation nicely, Perl::Critic violations are reduced to a single-line summary, even when the user has configured a detailed, verbose string in their .perlcriticrc.
For a team of developers, Perl::Critic is a vital teaching tool. We want to include the policy description (%d) and direct MetaCPAN links (https://metacpan.org/pod/Perl::Critic::Policy::%p) so developers can learn why a policy exists without hunting for documentation manually.
Current Behavior
In .perlcriticrc, I have:
verbose = %m [Policy: %p] | %d | Docs: https://metacpan.org/pod/Perl::Critic::Policy::%p
When running perlcritic in the terminal, the output is rich and includes the full description and URL. However, in VS Code, the hover only shows:
Critic: [Message] ([Policy], Severity: [X]) perlnavigator
The custom description and the URL are completely discarded by the LSP's diagnostic parser.
Desired Behavior
The Perl Navigator LSP should respect the verbose format defined in the user's .perlcriticrc (or passed via perlnavigator.critic.args) and display the entire resulting string in the VS Code Diagnostic message. This would allow:
- Clickable MetaCPAN links directly in the hover or Problems tab.
- In-editor education via the %d description string.
Example of what we want to see in the hover:
Subroutine "_log" does not end with "return" [Policy: Subroutines::RequireFinalReturn]
The last statement of every subroutine should be an explicit return statement. This makes the intended return value clear...
Docs: https://metacpan.org/pod/Perl::Critic::Policy::Subroutines::RequireFinalReturn
Note: I'm using a Remote SSH environment on Amazon Linux
The Problem
Currently, Perl Navigator appears to "sanitize" or truncate the output from
perlcriticbefore displaying it in the VS Code hover and Problems tab. While core Perl pragmas (likestrict) render full documentation nicely,Perl::Criticviolations are reduced to a single-line summary, even when the user has configured a detailed,verbosestring in their.perlcriticrc.For a team of developers,
Perl::Criticis a vital teaching tool. We want to include the policy description (%d) and direct MetaCPAN links (https://metacpan.org/pod/Perl::Critic::Policy::%p) so developers can learn why a policy exists without hunting for documentation manually.Current Behavior
In
.perlcriticrc, I have:When running
perlcriticin the terminal, the output is rich and includes the full description and URL. However, in VS Code, the hover only shows:The custom description and the URL are completely discarded by the LSP's diagnostic parser.
Desired Behavior
The Perl Navigator LSP should respect the verbose format defined in the user's
.perlcriticrc(or passed viaperlnavigator.critic.args) and display the entire resulting string in the VS Code Diagnostic message. This would allow:Example of what we want to see in the hover:
Note: I'm using a Remote SSH environment on Amazon Linux