[flake8-logging] Add flake8_logging boilerplate and first rule LOG009 (#7249)

## Summary

Adds `LOG009` from
[flake8-logging](https://github.com/adamchainz/flake8-logging). Also
adds the boilerplate for a new plugin

Checks for usages of undocumented `logging.WARN` constant and suggests
replacement with `logging.WARNING`.

## Test Plan

`cargo test` with fresh fixture

## Issue links

Refers: https://github.com/astral-sh/ruff/issues/7248
This commit is contained in:
qdegraaf 2023-09-15 03:41:32 +02:00 committed by GitHub
parent 64ea00048b
commit 3112202a5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 204 additions and 5 deletions

View file

@ -852,7 +852,11 @@ mod tests {
Rule::QuadraticListSummation,
];
const PREVIEW_RULES: &[Rule] = &[Rule::TooManyPublicMethods, Rule::SliceCopy];
const PREVIEW_RULES: &[Rule] = &[
Rule::TooManyPublicMethods,
Rule::SliceCopy,
Rule::UndocumentedWarn,
];
#[allow(clippy::needless_pass_by_value)]
fn resolve_rules(