mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 05:15:12 +00:00
[fastapi
] Implement fast-api-unused-path-parameter
(FAST003
) (#12638)
This adds the `fast-api-unused-path-parameter` lint rule, as described in #12632. I'm still pretty new to rust, so the code can probably be improved, feel free to tell me if there's any changes i should make. Also, i needed to add the `add_parameter` edit function, not sure if it was in the scope of the PR or if i should've made another one.
This commit is contained in:
parent
80efb865e9
commit
f121f8b31b
9 changed files with 751 additions and 1 deletions
|
@ -920,6 +920,7 @@ pub fn code_to_rule(linter: Linter, code: &str) -> Option<(RuleGroup, Rule)> {
|
|||
// fastapi
|
||||
(FastApi, "001") => (RuleGroup::Preview, rules::fastapi::rules::FastApiRedundantResponseModel),
|
||||
(FastApi, "002") => (RuleGroup::Preview, rules::fastapi::rules::FastApiNonAnnotatedDependency),
|
||||
(FastApi, "003") => (RuleGroup::Preview, rules::fastapi::rules::FastApiUnusedPathParameter),
|
||||
|
||||
// pydoclint
|
||||
(Pydoclint, "201") => (RuleGroup::Preview, rules::pydoclint::rules::DocstringMissingReturns),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue