✨ Clicking on a rule's code in the tooltip open the rule's documentationUrl in the browser#237
✨ Clicking on a rule's code in the tooltip open the rule's documentationUrl in the browser#237ouvreboite wants to merge 4 commits intostoplightio:masterfrom
Conversation
|
@ouvreboite Would you mind fixing the conflicts? I'd love to get this merged 🙏🏼 |
5a6256a to
ab60f27
Compare
This will give access to Diagnostic.CodeDescription
Allow to "click to know more" on a problem's rule code. cf https://docs.stoplight.io/docs/spectral/e5b9616d6d50c-rulesets#documentation-url
|
@mnaumanali94 this should be good now :) |
|
@ouvreboite Thanks for the quick turnaround and your contribution. I'll work on getting this out. |
|
@ouvreboite e2e tests are failing. Do you want to take a look? Otherwise i'll give it a go later 🙏🏼 |
|
I'll have a quick look. ⏳
|
|
Yes push away. I can take a look
We can fix the links in the ruleset separate from this feature. |
Requires VSCode 1.95+ and Node 20+ (due to @vscode/vsce)
|
@mnaumanali94 I've pushed a new commit with the VSCode upgrade |
Fixes #235
Allow to "click to know more" on a problem's rule code, using the rule/ruleset documentationUrl.
This allow the user to access a richer documentation and to not be restricted to just the error message/error code.
Checklist
Does this PR introduce a breaking change?
The error-code becomes clickable (in the Problems view but also in the tooltip).
The link is constructed following the rules defined here:
#the-rule-codeappendedAdditional context
🚨This feature requires Diagnostic.codeDescription, with is available in https://www.npmjs.com/package/vscode-languageserver-types > 3.16, which required upgrading some other vscode-languageserver and client dependencies.
I'm using a basic ruleset to test it locally, but I've not pushed it: