kopium icon indicating copy to clipboard operation
kopium copied to clipboard

Address clippy fixes in the generated documentation

Open suryapandian opened this issue 2 years ago • 1 comments

  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

suryapandian avatar Feb 06 '23 05:02 suryapandian

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 avatar Feb 06 '23 06:02 clux