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

Address clippy fixes in the generated documentation #107

Open
suryapandian opened this issue Feb 6, 2023 · 1 comment
Open

Address clippy fixes in the generated documentation #107

suryapandian opened this issue Feb 6, 2023 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@suryapandian
Copy link

suryapandian commented Feb 6, 2023

  1. The document generated should have backticks
    For example:
    Current behavior: /// RuleGroup is a list of sequentially evaluated
    Expected behavior: /// RuleGroup is a list of sequentially evaluated

  2. Bare URLs should be between </> or should be made a proper Markdown links
    Current behavior: More info: https://github.com/thanos-io/thanos/blob/main/docs/components/rule.md#partial-response
    Expected behavior More info
    or /https://github.com/thanos-io/thanos/blob/main/docs/components/rule.md#partial-response/

For more info:
https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown

@clux
Copy link
Member

clux commented Feb 6, 2023

For 1; It is possible to build up a list of all symbols we see and auto-backtick them in docs before printing whenever we see them. Could be a nice optional feature, but note that we can never fix all the cases because it's impossible to know if they are referring to types outside the schema.

For 2 We'd have to just wrap the link. Could be an escaping function - provided there's a standard way to identify urls.

PRs welcome around src/output.rs here.

@clux clux changed the title Address clippy fixes in the generated documents Address clippy fixes in the generated documentation Feb 6, 2023
@clux clux added enhancement New feature or request help wanted Extra attention is needed labels Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants