Use H3 for rules sections

This commit is contained in:
Charlie Marsh 2022-10-15 16:33:26 -04:00
parent e3ecf21287
commit 10868445f5
2 changed files with 10 additions and 10 deletions

View File

@ -245,7 +245,7 @@ Beyond rule-set parity, Ruff suffers from the following limitations vis-à-vis F
By default, Ruff enables all `E`, `W`, and `F` error codes, which correspond to those built-in to By default, Ruff enables all `E`, `W`, and `F` error codes, which correspond to those built-in to
Flake8. Flake8.
## Pyflakes ### Pyflakes
| Code | Name | Message | | Code | Name | Message |
| ---- | ---- | ------- | | ---- | ---- | ------- |
@ -278,7 +278,7 @@ Flake8.
| F841 | UnusedVariable | Local variable `...` is assigned to but never used | | F841 | UnusedVariable | Local variable `...` is assigned to but never used |
| F901 | RaiseNotImplemented | `raise NotImplemented` should be `raise NotImplementedError` | | F901 | RaiseNotImplemented | `raise NotImplemented` should be `raise NotImplementedError` |
## pycodestyle ### pycodestyle
| Code | Name | Message | | Code | Name | Message |
| ---- | ---- | ------- | | ---- | ---- | ------- |
@ -298,7 +298,7 @@ Flake8.
| E999 | SyntaxError | SyntaxError: `...` | | E999 | SyntaxError | SyntaxError: `...` |
| W292 | NoNewLineAtEndOfFile | No newline at end of file | | W292 | NoNewLineAtEndOfFile | No newline at end of file |
## pydocstyle ### pydocstyle
| Code | Name | Message | | Code | Name | Message |
| ---- | ---- | ------- | | ---- | ---- | ------- |
@ -347,7 +347,7 @@ Flake8.
| D418 | SkipDocstring | Function decorated with @overload shouldn't contain a docstring | | D418 | SkipDocstring | Function decorated with @overload shouldn't contain a docstring |
| D419 | NonEmpty | Docstring is empty | | D419 | NonEmpty | Docstring is empty |
## pyupgrade ### pyupgrade
| Code | Name | Message | | Code | Name | Message |
| ---- | ---- | ------- | | ---- | ---- | ------- |
@ -360,7 +360,7 @@ Flake8.
| U007 | UsePEP604Annotation | Use `X \| Y` for type annotations | | U007 | UsePEP604Annotation | Use `X \| Y` for type annotations |
| U008 | SuperCallWithParameters | Use `super()` instead of `super(__class__, self)` | | U008 | SuperCallWithParameters | Use `super()` instead of `super(__class__, self)` |
## flake8-comprehensions ### flake8-comprehensions
| Code | Name | Message | | Code | Name | Message |
| ---- | ---- | ------- | | ---- | ---- | ------- |
@ -381,7 +381,7 @@ Flake8.
| C416 | UnnecessaryComprehension | Unnecessary <list/set> comprehension - rewrite using <list/set>() | | C416 | UnnecessaryComprehension | Unnecessary <list/set> comprehension - rewrite using <list/set>() |
| C417 | UnnecessaryMap | Unnecessary map usage - rewrite using a <list/set/dict> comprehension | | C417 | UnnecessaryMap | Unnecessary map usage - rewrite using a <list/set/dict> comprehension |
## flake8-bugbear ### flake8-bugbear
| Code | Name | Message | | Code | Name | Message |
| ---- | ---- | ------- | | ---- | ---- | ------- |
@ -389,7 +389,7 @@ Flake8.
| B014 | DuplicateHandlerException | Exception handler with duplicate exception: `ValueError` | | B014 | DuplicateHandlerException | Exception handler with duplicate exception: `ValueError` |
| B025 | DuplicateTryBlockException | try-except block with duplicate exception `Exception` | | B025 | DuplicateTryBlockException | try-except block with duplicate exception `Exception` |
## flake8-builtins ### flake8-builtins
| Code | Name | Message | | Code | Name | Message |
| ---- | ---- | ------- | | ---- | ---- | ------- |
@ -397,14 +397,14 @@ Flake8.
| A002 | BuiltinArgumentShadowing | Argument `...` is shadowing a python builtin | | A002 | BuiltinArgumentShadowing | Argument `...` is shadowing a python builtin |
| A003 | BuiltinAttributeShadowing | Class attribute `...` is shadowing a python builtin | | A003 | BuiltinAttributeShadowing | Class attribute `...` is shadowing a python builtin |
## flake8-print ### flake8-print
| Code | Name | Message | | Code | Name | Message |
| ---- | ---- | ------- | | ---- | ---- | ------- |
| T201 | PrintFound | `print` found | | T201 | PrintFound | `print` found |
| T203 | PPrintFound | `pprint` found | | T203 | PPrintFound | `pprint` found |
## Meta rules ### Meta rules
| Code | Name | Message | | Code | Name | Message |
| ---- | ---- | ------- | | ---- | ---- | ------- |

View File

@ -6,7 +6,7 @@ use ruff::checks::{CheckCategory, CheckCode};
fn main() { fn main() {
for check_category in CheckCategory::iter() { for check_category in CheckCategory::iter() {
println!("## {}", check_category.title()); println!("### {}", check_category.title());
println!(); println!();
println!("| Code | Name | Message |"); println!("| Code | Name | Message |");