mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 18:58:04 +00:00
fix: Update add_rule.py to create new files for rules
This commit is contained in:
parent
16c81f75c2
commit
44e2b6208a
1 changed files with 1 additions and 1 deletions
|
@ -42,7 +42,7 @@ def main(*, name: str, code: str, origin: str) -> None:
|
|||
fp.write("\n")
|
||||
|
||||
# Add the relevant rule function.
|
||||
with open(ROOT_DIR / "src/rules" / dir_name(origin) / "rules.rs", "a") as fp:
|
||||
with open(ROOT_DIR / "src/rules" / dir_name(origin) / (snake_case(name) + ".rs"), "w") as fp:
|
||||
fp.write(
|
||||
f"""
|
||||
/// {code}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue