kopium
kopium copied to clipboard
Address clippy fixes in the generated documentation
-
The document generated should have backticks For example: Current behavior: /// RuleGroup is a list of sequentially evaluated Expected behavior: ///
RuleGroupis a list of sequentially evaluated -
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
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.