Skip to content
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

Options included via ruff rule F841 (or equivalent) are unlinked #2867

Closed
charliermarsh opened this issue Feb 13, 2023 · 3 comments
Closed
Labels
cli Related to the command-line interface

Comments

@charliermarsh
Copy link
Member

charliermarsh commented Feb 13, 2023

Should we just make these direct links to the documentation rather than references?

Screen Shot 2023-02-13 at 2 39 44 PM

@charliermarsh charliermarsh added the cli Related to the command-line interface label Feb 13, 2023
@charliermarsh
Copy link
Member Author

Alternatively, should we rewrite these links during ruff rule?

@ngnpope
Copy link
Contributor

ngnpope commented Feb 13, 2023

Yeah. It looks like mdcat has some limitations, including:

Not supported:

Reflowing paragraphs will be a problem, especially with longer links.

An alternative could be termimad which supports reflowing and tables, but I think that is lacking in other areas, e.g. code highlighting.

@not-my-profile
Copy link
Contributor

not-my-profile commented Feb 14, 2023

I intentionally did not include these links in the ruff rule output. The installed ruff may not always be up to date so having its output link to the latest documentation could be confusing.

I implemented the config subcommand in #2775, which can show all the information we have about config settings. I think it would make sense to either automatically add a note ``Learn more about these options with ruff config <option>``` or alternatively simply automatically including the option description in the ruff` rule output.

Reflowing paragraphs will be a problem, especially with longer links.

Reflowing is not a problem because we can use CommonMark link definitions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Related to the command-line interface
Projects
None yet
Development

No branches or pull requests

3 participants