ruff/crates/ruff_dev/src
Martin Fischer 28c9263722 Automatically linkify option references in rule documentation
Previously the rule documentation referenced configuration options
via full https:// URLs, which was bad for several reasons:

* changing the website would mean you'd have to change all URLs
* the links didn't work when building mkdocs locally
* the URLs showed up in the `ruff rule` output
* broken references weren't detected by our CI

This commit solves all of these problems by post-processing the
Markdown, recognizing sections such as:

    ## Options

    * `flake8-tidy-imports.ban-relative-imports`

`cargo dev generate-all` will automatically linkify such references
and panic if the referenced option doesn't exist.
Note that the option can also be linked in the other Markdown sections
via e.g. [`flake8-tidy-imports.ban-relative-imports`] since
the post-processing code generates a CommonMark link definition.

Resolves #2766.
2023-02-12 13:19:11 -05:00
..
generate_all.rs Create per-rule pages and link from README (#2644) 2023-02-07 18:15:05 -05:00
generate_cli_help.rs Reorder imports (#2638) 2023-02-07 16:22:47 -05:00
generate_docs.rs Automatically linkify option references in rule documentation 2023-02-12 13:19:11 -05:00
generate_json_schema.rs refactor: Introduce crates folder (#2088) 2023-02-05 16:47:48 -05:00
generate_options.rs refactor: Move name out of OptionField & OptionGroup 2023-02-11 23:43:09 -05:00
generate_rules_table.rs refactor: Reduce code duplication 2023-02-10 08:24:22 -05:00
main.rs Create per-rule pages and link from README (#2644) 2023-02-07 18:15:05 -05:00
print_ast.rs refactor: Introduce crates folder (#2088) 2023-02-05 16:47:48 -05:00
print_cst.rs refactor: Introduce crates folder (#2088) 2023-02-05 16:47:48 -05:00
print_tokens.rs refactor: Introduce crates folder (#2088) 2023-02-05 16:47:48 -05:00
round_trip.rs refactor: Introduce crates folder (#2088) 2023-02-05 16:47:48 -05:00
utils.rs refactor: Introduce crates folder (#2088) 2023-02-05 16:47:48 -05:00