ruff/scripts
Auguste Lalande a5f41e8d63
Add a formatting step using `mdformat` as part of `generate_mkdocs.py` (#10484)
## Summary

The purpose of this change is mainly to address one of the issues
outlined in #10427. Namely, some lists in the docs were not rendering
properly when preceded by a text block without a newline character. This
PR adds `mdformat` as a final step to the rule documentation script, so
that any missing newlines will be added.

NB: The default behavior of `mdformat` is to escape markdown special
characters found in text such as `<`. This resulted in some misformatted
docs. To address this I implemented an ad-hoc mdformat plugin to
override the behavior. This may be considered a bit 'hacky', but I think
it's a good solution. Nevertheless, if someone has a better idea, let me
know.

## Test Plan

This change is hard to test systematically, however, I tried my best to
look at the before and after diffs to ensure no unwanted changes were
made to the docs.
2024-03-21 00:37:40 +00:00
..
benchmarks Bump version to 0.3.3 (#10425) 2024-03-15 12:51:49 -05:00
release Add release script (#10305) 2024-03-11 16:26:21 -05:00
Dockerfile.ecosystem Remove outdated feature flag from Dockerfile.ecosystem (#4620) 2023-05-24 08:19:08 +00:00
_mdformat_utils.py Add a formatting step using `mdformat` as part of `generate_mkdocs.py` (#10484) 2024-03-21 00:37:40 +00:00
_utils.py Use `__future__` imports in scripts (#5301) 2023-06-22 11:40:16 -04:00
add_plugin.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
add_rule.py Rename `RuleGroup::Unspecified` to `Stable` (#7991) 2023-10-16 14:53:27 -05:00
check_docs_formatted.py [`pycodestyle`] Implement `blank-line-at-end-of-file` (`W391`) (#10243) 2024-03-11 22:07:59 -04:00
check_ecosystem.py Add a non-latin project to the ecosystem checks (#9199) 2023-12-19 16:14:01 -05:00
ecosystem_all_check.py Rename `Autofix` to `Fix` (#7657) 2023-09-28 10:53:05 +00:00
ecosystem_all_check.sh Rename `Autofix` to `Fix` (#7657) 2023-09-28 10:53:05 +00:00
ecosystem_all_check_entrypoint.sh Make ecosystem all check more generic (#4629) 2023-05-24 16:26:23 +02:00
formatter_ecosystem_checks.sh Fix the ecosystem check (#10155) 2024-02-28 17:42:06 +00:00
generate_known_standard_library.py Remove HashMap and HashSet for known-standard-library detection (#5345) 2023-06-23 19:59:03 +00:00
generate_mkdocs.py Add a formatting step using `mdformat` as part of `generate_mkdocs.py` (#10484) 2024-03-21 00:37:40 +00:00
pyproject.toml Use `tool.ruff.lint` in more places (#8317) 2023-10-28 18:39:38 -05:00
transform_readme.py Use `__future__` imports in scripts (#5301) 2023-06-22 11:40:16 -04:00
update_ambiguous_characters.py Use characters instead of `u32` in confusable map (#8463) 2023-11-03 09:57:47 -04:00
update_schemastore.py Fix the sorting of the schema submited to schemastore (#10173) 2024-02-29 18:21:54 +00:00