-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support to open the online message documentation as quick fix action #298
Conversation
@microsoft-github-policy-service agree |
Just voicing my gratitude for this idea. I never thought about this but I think it is a really nice benefit of all the work we put in and is also likely to generate more interest in making the examples even better/informative! Hope that this makes it into the plugin! |
@DanielNoord Do we need to be version specific when opening the link? we do capture version information on LS load, so we should be able to re-use that information. |
@DudeNr33 What do you think about using the |
Not every version is available online, so that will be problematic: Furthermore, older versions of the documentation don't have the message documentation in the required format. It is available only from v2.14.5 onwards. Plus, it has been an ongoing effort, so the older versions are not as complete as the latest version. The only case where the version information could be useful is in case some message was removed entirely. However in the proper way to handle this on Pylint side would be to keep the documentation link and include a "Removed in version x.y". But I am also interested in Daniel's or @Pierre-Sassoulas opinion on this. Thank you for the suggestion with |
We should show the latest version all the time and we have an ongoing effort to keep the documentation for deleted messages in pylint. Not showing anything if the page does not exist seems safer (almost everything is documented but not everything yet). |
You shouldn't... We have set it up so that deprecated message names will have a short overview of where to go to for the new message, see: So, as long as we keep reminding ourselves that we should provide redirects whenever we change the documentation folder layout you should be good with Edit: Oh wow, it's |
I tried it and it would be equally easy to implement. I'm fine either way. The |
I recommend the |
Updated to use |
@DudeNr33 This is now available in pre-release version |
That was fast, thanks! |
The Pylint community put in a lot of work to document the messages with good / bad code examples and optionally additional information (see pylint-dev/pylint#5953).
Now that the majority of messages are covered (and the uncovered ones have at least placeholders), I think it would be really nice if users of
vscode-pylint
could directly open up this documentation in VS Code.This PR adds a new quick fix code action that is available for every message and allows to open up the corresponding link in the online documentation for the respective message in a
SimpleBrowser
view:Let me know what you think!