-
Notifications
You must be signed in to change notification settings - Fork 280
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
[WIP] Added html and markdown url to documentation_link #1451
Conversation
The html and markdown url should be useful to visit the documentation in a browser or to parse the markdown and extract information about the rule (with some linters, etc...).
Thoughts about how to solve the ABC size metric warning? I was thinking in split the method, but should not work because there will be too many methods. |
Hi @vzamanillo, thanks for your contribution. I have a question and some remarks:
|
(Don't worry about the ABC size metric for now.) |
Hi Matijs,
I have not my branch for linter-reek published yet but the intention is the same as linter-rubocop does, to show the rule description on linter marker tooltip, you can check the getMarkDown source code.
This is what my actual implementation does, replace the URL parts to get the raw content URL.
Thanks, let me know about anything I can do. |
I'm not following. In this PR you replace almost the entire URL? My point is that your linter can take the URL that Reek already provides and replace The screen shot for linter-rubocop you posted shows one problem with your approach: The documentation linked to was never created for non-human consumption, so you may get all kinds of artifacts in the output. There is no guarantee Reek's documentation will keep the structure it has currently. |
Sorry, I was talking about my pending linter-reek implementation who's consume the raw markdown data, not about this PR.
My purpose was to use a pattern in the documentation to get a brief description of the reek warning, for example, all reek documentation written in markdown has an "Introduction" section that could be used, it could be interesting. |
Ok, that explains it. I think that's actually a good approach for what you're trying to do.
I'm afraid there's no guarantee it will stay that way. My advice would be to put a link in the tooltip (if that's possible), that will open the page in the browser when clicked. It's beneficial for users of Reek to read the full docs for each smell. |
I get it.
This is what my linter-reek implementation is doing actually. Thanks! |
You can check this linter-reek PR in case you are curious to see the implementation that I mentioned earlier. |
The html and markdown url should be useful to visit the documentation in a browser or to parse the markdown and extract information about the rule (with some linters, etc...).