mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-28 21:05:08 +00:00
![]() I am working on a project that uses ruff linters' docs to generate a fine-tuning dataset for LLMs. To achieve this, I first ran the command `ruff rule --all --output-format json` to retrieve all the rules. Then, I parsed the explanation field to get these 3 consistent sections: - `Why is this bad?` - `What it does` - `Example` However, during the initial processing, I noticed that the markdown headings are not that consistent. For instance: - In most cases, `Use instead` appears as a normal paragraph within the `Example` section, but in the file `crates/ruff_linter/src/rules/flake8_bandit/rules/django_extra.rs` it is a level-2 heading - The heading "What it does**?**" is used in some places, while others consistently use "What it does" - There are 831 `Example` headings and 65 `Examples`. But all of them only have one example case This PR normalized these across all rules. ## Test Plan CI are passed. |
||
---|---|---|
.. | ||
resources | ||
src | ||
Cargo.toml |