From 68a6d06868fc47aff3aa7e9fc67e7c152144b224 Mon Sep 17 00:00:00 2001 From: ScDor <18174994+ScDor@users.noreply.github.com> Date: Tue, 10 Feb 2026 22:14:36 +0200 Subject: [PATCH 1/5] chore: ignore .worktrees directory --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 8975856..bd963f8 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ __pycache__ /result.md /artifacts .python-version +.worktrees/ From 2929cdea34e1a999ab8a192b0fabb35b3317403c Mon Sep 17 00:00:00 2001 From: ScDor <18174994+ScDor@users.noreply.github.com> Date: Tue, 10 Feb 2026 22:15:06 +0200 Subject: [PATCH 2/5] feat: add adopt-ruff skill --- skills/adopt-ruff/SKILL.md | 70 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 skills/adopt-ruff/SKILL.md diff --git a/skills/adopt-ruff/SKILL.md b/skills/adopt-ruff/SKILL.md new file mode 100644 index 0000000..9d533d9 --- /dev/null +++ b/skills/adopt-ruff/SKILL.md @@ -0,0 +1,70 @@ +--- +name: adopt-ruff +description: Use when you want to expand Ruff rule coverage in a Python repository using adopt-ruff suggestions. +--- + +# Adopt-Ruff + +## Overview +"Ruffness" is the measure of how comprehensively a Python project utilizes [Ruff](https://ruff.rs) for linting and formatting. Increasing ruffness means systematically adopting more rules to catch bugs, enforce style, and improve maintainability. + +## When to Use +- You want to increase the linting strictness of a Python repository. +- You are using `adopt-ruff` to find configuration gaps. +- You need a structured way to migrate from other linters (flake8, pylint) to Ruff. + +## Core Workflow + +### 1. Baseline Analysis +Run `adopt-ruff` to see your current status: +```bash +adopt-ruff --path . --repo-name +``` +Review the generated `result.md` or Job Summary. + +### 2. The "Zero-Effort" Phase (Respected Rules) +Start with rules your codebase already obeys. +- **Identify:** Look at the "Respected Ruff rules" table. +- **Execute:** Add these codes to the `lint.extend-select` (or `select`) list in `pyproject.toml`. +- **Verification:** Run `ruff check .` to ensure zero violations. + +### 3. The "Automated" Phase (Autofixable Rules) +Adopt rules that Ruff can fix for you. +- **Identify:** Look at the "Autofixable Ruff rules" table. +- **Batching:** Select 1-5 rules at a time. +- **Execute:** + 1. Add rules to configuration. + 2. Run `ruff check . --fix`. + 3. Verify changes. +- **Commit:** Use a descriptive commit like `style: apply ruff autofixes for [RULE_CODES]`. + +### 4. The "Incremental" Phase (Applicable Rules) +Handle rules requiring manual intervention, prioritized by least resistance. +- **Identify:** Look at "Applicable Rules" (sorted by ascending violation count). +- **Execute:** Start with rules having 1-5 violations. Fix them manually and enable the rule. +- **Refinement:** For rules with hundreds of violations, consider if the rule is appropriate for your project before attempting a mass fix. + +## Common Mistakes +- **Bulk Enabling:** Enabling 50+ rules at once often leads to "fix fatigue" and abandoned PRs. +- **Config Noise:** Forgetting to remove old linter configs (flake8, isort) after adopting their Ruff equivalents. +- **Ignoring Previews:** Not using the `--preview` flag to see upcoming rules that might benefit the project early. + +## Common Rationalizations +| Excuse | Reality | +|--------|---------| +| "I'll fix all 200 violations manually" | You'll likely burn out or introduce bugs. Use the incremental approach. | +| "Respected rules aren't important" | They prevent future regressions and keep the codebase consistent. | +| "I don't need adopt-ruff, I'll just use 'ALL'" | 'ALL' includes conflicting or non-idiomatic rules. `adopt-ruff` helps you select what fits your repo. | + +## Red Flags +- PRs containing both Ruff configuration changes AND unrelated feature logic. +- Massive commits labeled "ruff: fix everything". +- Enabling a rule then adding dozens of `# noqa` comments instead of fixing the code. + +## Quick Reference Table +| Rule Category | Priority | Tooling | Effort | +|---------------|----------|---------|--------| +| Respected | High | `adopt-ruff` | ⚡ Trivial | +| Autofixable | Medium | `ruff --fix` | 🪄 Low | +| Low Violation | Low | Manual | 🔎 Moderate | +| High Violation | Evaluate | Manual/Scripted | 🛠️ High | From 6118ff1f82dad2c0b9a9b15b55ceea7083d7dc52 Mon Sep 17 00:00:00 2001 From: ScDor <18174994+ScDor@users.noreply.github.com> Date: Tue, 10 Feb 2026 22:18:01 +0200 Subject: [PATCH 3/5] chore: narrow ignored ruff rules --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 11b8ac5..df36715 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,9 +38,9 @@ target-version = "py311" select = ["ALL"] ignore = [ "ISC001", - "ANN", + "ANN201", + "ANN202", "D", - "DTZ", "COM812", "EM102", "TRY003", From 60948e3d749e0e6982a8015a61168f600e40899d Mon Sep 17 00:00:00 2001 From: ScDor <18174994+ScDor@users.noreply.github.com> Date: Tue, 10 Feb 2026 22:18:13 +0200 Subject: [PATCH 4/5] style: apply ruff docstring fixes --- adopt_ruff/models/ruff_config.py | 4 +- adopt_ruff/utils.py | 9 +- rules_status.json | 1060 ++++++++++++++++++++++++++++++ 3 files changed, 1063 insertions(+), 10 deletions(-) create mode 100644 rules_status.json diff --git a/adopt_ruff/models/ruff_config.py b/adopt_ruff/models/ruff_config.py index 62337ee..fc5a0fa 100644 --- a/adopt_ruff/models/ruff_config.py +++ b/adopt_ruff/models/ruff_config.py @@ -83,9 +83,7 @@ def all_rules(self) -> set[Rule]: def _parse_raw_rules(raw_codes: set[str], rules: set[Rule]) -> set[Rule]: - """ - Convert code values (E401), categories (E) and ALL, into Rule objects - """ + """Convert code values (E401), categories (E) and ALL, into Rule objects.""" if "ALL" in raw_codes: return rules diff --git a/adopt_ruff/utils.py b/adopt_ruff/utils.py index db241f5..744ce7d 100644 --- a/adopt_ruff/utils.py +++ b/adopt_ruff/utils.py @@ -48,10 +48,7 @@ def output_table( collapsible: bool, collapsible_summary: str = "Details", ) -> None: - """ - Creates a markdown table, and saves to a CSV - """ - + """Creates a markdown table, and saves to a CSV.""" md_table = tabulate( [make_name_clickable(item) for item in items], tablefmt="github", @@ -72,9 +69,7 @@ def make_name_clickable(item: dict) -> dict: def search_config_file(path: Path) -> Path | None: - """ - Searches for common configuration files under the given directory. - """ + """Searches for common configuration files under the given directory.""" for name in ("pyproject.toml", "ruff.toml", ".ruff.toml"): if (file_path := path / name).exists(): logger.info(f"found config file at {file_path.resolve()!s}") diff --git a/rules_status.json b/rules_status.json new file mode 100644 index 0000000..4f5ccd1 --- /dev/null +++ b/rules_status.json @@ -0,0 +1,1060 @@ +[ + { + "cell": null, + "code": "D104", + "end_location": { + "column": 1, + "row": 1 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/__init__.py", + "fix": null, + "location": { + "column": 1, + "row": 1 + }, + "message": "Missing docstring in public package", + "noqa_row": 1, + "url": "https://docs.astral.sh/ruff/rules/undocumented-public-package" + }, + { + "cell": null, + "code": "D100", + "end_location": { + "column": 1, + "row": 1 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/main.py", + "fix": null, + "location": { + "column": 1, + "row": 1 + }, + "message": "Missing docstring in public module", + "noqa_row": 1, + "url": "https://docs.astral.sh/ruff/rules/undocumented-public-module" + }, + { + "cell": null, + "code": "D103", + "end_location": { + "column": 13, + "row": 21 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/main.py", + "fix": null, + "location": { + "column": 5, + "row": 21 + }, + "message": "Missing docstring in public function", + "noqa_row": 21, + "url": "https://docs.astral.sh/ruff/rules/undocumented-public-function" + }, + { + "cell": null, + "code": "D103", + "end_location": { + "column": 8, + "row": 72 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/main.py", + "fix": null, + "location": { + "column": 5, + "row": 72 + }, + "message": "Missing docstring in public function", + "noqa_row": 72, + "url": "https://docs.astral.sh/ruff/rules/undocumented-public-function" + }, + { + "cell": null, + "code": "D103", + "end_location": { + "column": 17, + "row": 196 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/main.py", + "fix": null, + "location": { + "column": 5, + "row": 196 + }, + "message": "Missing docstring in public function", + "noqa_row": 196, + "url": "https://docs.astral.sh/ruff/rules/undocumented-public-function" + }, + { + "cell": null, + "code": "D103", + "end_location": { + "column": 20, + "row": 200 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/main.py", + "fix": null, + "location": { + "column": 5, + "row": 200 + }, + "message": "Missing docstring in public function", + "noqa_row": 200, + "url": "https://docs.astral.sh/ruff/rules/undocumented-public-function" + }, + { + "cell": null, + "code": "D103", + "end_location": { + "column": 22, + "row": 217 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/main.py", + "fix": null, + "location": { + "column": 5, + "row": 217 + }, + "message": "Missing docstring in public function", + "noqa_row": 217, + "url": "https://docs.astral.sh/ruff/rules/undocumented-public-function" + }, + { + "cell": null, + "code": "D103", + "end_location": { + "column": 19, + "row": 241 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/main.py", + "fix": null, + "location": { + "column": 5, + "row": 241 + }, + "message": "Missing docstring in public function", + "noqa_row": 241, + "url": "https://docs.astral.sh/ruff/rules/undocumented-public-function" + }, + { + "cell": null, + "code": "D103", + "end_location": { + "column": 28, + "row": 255 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/main.py", + "fix": null, + "location": { + "column": 5, + "row": 255 + }, + "message": "Missing docstring in public function", + "noqa_row": 255, + "url": "https://docs.astral.sh/ruff/rules/undocumented-public-function" + }, + { + "cell": null, + "code": "ANN202", + "end_location": { + "column": 10, + "row": 268 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/main.py", + "fix": { + "applicability": "unsafe", + "edits": [ + { + "content": " -> None", + "end_location": { + "column": 2, + "row": 315 + }, + "location": { + "column": 2, + "row": 315 + } + } + ], + "message": "Add return type annotation: `None`" + }, + "location": { + "column": 5, + "row": 268 + }, + "message": "Missing return type annotation for private function `_main`", + "noqa_row": 268, + "url": "https://docs.astral.sh/ruff/rules/missing-return-type-private-function" + }, + { + "cell": null, + "code": "ANN201", + "end_location": { + "column": 9, + "row": 342 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/main.py", + "fix": { + "applicability": "unsafe", + "edits": [ + { + "content": " -> None", + "end_location": { + "column": 11, + "row": 342 + }, + "location": { + "column": 11, + "row": 342 + } + } + ], + "message": "Add return type annotation: `None`" + }, + "location": { + "column": 5, + "row": 342 + }, + "message": "Missing return type annotation for public function `main`", + "noqa_row": 342, + "url": "https://docs.astral.sh/ruff/rules/missing-return-type-undocumented-public-function" + }, + { + "cell": null, + "code": "D103", + "end_location": { + "column": 9, + "row": 342 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/main.py", + "fix": null, + "location": { + "column": 5, + "row": 342 + }, + "message": "Missing docstring in public function", + "noqa_row": 342, + "url": "https://docs.astral.sh/ruff/rules/undocumented-public-function" + }, + { + "cell": null, + "code": "D104", + "end_location": { + "column": 1, + "row": 1 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/models/__init__.py", + "fix": null, + "location": { + "column": 1, + "row": 1 + }, + "message": "Missing docstring in public package", + "noqa_row": 1, + "url": "https://docs.astral.sh/ruff/rules/undocumented-public-package" + }, + { + "cell": null, + "code": "D100", + "end_location": { + "column": 1, + "row": 1 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/models/ruff_config.py", + "fix": null, + "location": { + "column": 1, + "row": 1 + }, + "message": "Missing docstring in public module", + "noqa_row": 1, + "url": "https://docs.astral.sh/ruff/rules/undocumented-public-module" + }, + { + "cell": null, + "code": "D101", + "end_location": { + "column": 20, + "row": 13 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/models/ruff_config.py", + "fix": null, + "location": { + "column": 7, + "row": 13 + }, + "message": "Missing docstring in public class", + "noqa_row": 13, + "url": "https://docs.astral.sh/ruff/rules/undocumented-public-class" + }, + { + "cell": null, + "code": "D102", + "end_location": { + "column": 18, + "row": 18 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/models/ruff_config.py", + "fix": null, + "location": { + "column": 9, + "row": 18 + }, + "message": "Missing docstring in public method", + "noqa_row": 18, + "url": "https://docs.astral.sh/ruff/rules/undocumented-public-method" + }, + { + "cell": null, + "code": "D102", + "end_location": { + "column": 23, + "row": 53 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/models/ruff_config.py", + "fix": null, + "location": { + "column": 9, + "row": 53 + }, + "message": "Missing docstring in public method", + "noqa_row": 53, + "url": "https://docs.astral.sh/ruff/rules/undocumented-public-method" + }, + { + "cell": null, + "code": "D101", + "end_location": { + "column": 17, + "row": 60 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/models/ruff_config.py", + "fix": null, + "location": { + "column": 7, + "row": 60 + }, + "message": "Missing docstring in public class", + "noqa_row": 60, + "url": "https://docs.astral.sh/ruff/rules/undocumented-public-class" + }, + { + "cell": null, + "code": "D102", + "end_location": { + "column": 18, + "row": 65 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/models/ruff_config.py", + "fix": null, + "location": { + "column": 9, + "row": 65 + }, + "message": "Missing docstring in public method", + "noqa_row": 65, + "url": "https://docs.astral.sh/ruff/rules/undocumented-public-method" + }, + { + "cell": null, + "code": "D102", + "end_location": { + "column": 18, + "row": 81 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/models/ruff_config.py", + "fix": null, + "location": { + "column": 9, + "row": 81 + }, + "message": "Missing docstring in public method", + "noqa_row": 81, + "url": "https://docs.astral.sh/ruff/rules/undocumented-public-method" + }, + { + "cell": null, + "code": "D200", + "end_location": { + "column": 8, + "row": 88 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/models/ruff_config.py", + "fix": { + "applicability": "unsafe", + "edits": [ + { + "content": "\"\"\"Convert code values (E401), categories (E) and ALL, into Rule objects\"\"\"", + "end_location": { + "column": 8, + "row": 88 + }, + "location": { + "column": 5, + "row": 86 + } + } + ], + "message": "Reformat to one line" + }, + "location": { + "column": 5, + "row": 86 + }, + "message": "One-line docstring should fit on one line", + "noqa_row": 88, + "url": "https://docs.astral.sh/ruff/rules/fits-on-one-line" + }, + { + "cell": null, + "code": "D212", + "end_location": { + "column": 8, + "row": 88 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/models/ruff_config.py", + "fix": { + "applicability": "safe", + "edits": [ + { + "content": "", + "end_location": { + "column": 5, + "row": 87 + }, + "location": { + "column": 8, + "row": 86 + } + } + ], + "message": "Remove whitespace after opening quotes" + }, + "location": { + "column": 5, + "row": 86 + }, + "message": "Multi-line docstring summary should start at the first line", + "noqa_row": 88, + "url": "https://docs.astral.sh/ruff/rules/multi-line-summary-first-line" + }, + { + "cell": null, + "code": "D400", + "end_location": { + "column": 8, + "row": 88 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/models/ruff_config.py", + "fix": { + "applicability": "unsafe", + "edits": [ + { + "content": ".", + "end_location": { + "column": 74, + "row": 87 + }, + "location": { + "column": 74, + "row": 87 + } + } + ], + "message": "Add period" + }, + "location": { + "column": 5, + "row": 86 + }, + "message": "First line should end with a period", + "noqa_row": 88, + "url": "https://docs.astral.sh/ruff/rules/ends-in-period" + }, + { + "cell": null, + "code": "D415", + "end_location": { + "column": 8, + "row": 88 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/models/ruff_config.py", + "fix": { + "applicability": "unsafe", + "edits": [ + { + "content": ".", + "end_location": { + "column": 74, + "row": 87 + }, + "location": { + "column": 74, + "row": 87 + } + } + ], + "message": "Add closing punctuation" + }, + "location": { + "column": 5, + "row": 86 + }, + "message": "First line should end with a period, question mark, or exclamation point", + "noqa_row": 88, + "url": "https://docs.astral.sh/ruff/rules/ends-in-punctuation" + }, + { + "cell": null, + "code": "D100", + "end_location": { + "column": 1, + "row": 1 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/models/ruff_output.py", + "fix": null, + "location": { + "column": 1, + "row": 1 + }, + "message": "Missing docstring in public module", + "noqa_row": 1, + "url": "https://docs.astral.sh/ruff/rules/undocumented-public-module" + }, + { + "cell": null, + "code": "D101", + "end_location": { + "column": 15, + "row": 6 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/models/ruff_output.py", + "fix": null, + "location": { + "column": 7, + "row": 6 + }, + "message": "Missing docstring in public class", + "noqa_row": 6, + "url": "https://docs.astral.sh/ruff/rules/undocumented-public-class" + }, + { + "cell": null, + "code": "D101", + "end_location": { + "column": 11, + "row": 11 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/models/ruff_output.py", + "fix": null, + "location": { + "column": 7, + "row": 11 + }, + "message": "Missing docstring in public class", + "noqa_row": 11, + "url": "https://docs.astral.sh/ruff/rules/undocumented-public-class" + }, + { + "cell": null, + "code": "D101", + "end_location": { + "column": 10, + "row": 17 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/models/ruff_output.py", + "fix": null, + "location": { + "column": 7, + "row": 17 + }, + "message": "Missing docstring in public class", + "noqa_row": 17, + "url": "https://docs.astral.sh/ruff/rules/undocumented-public-class" + }, + { + "cell": null, + "code": "D101", + "end_location": { + "column": 16, + "row": 23 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/models/ruff_output.py", + "fix": null, + "location": { + "column": 7, + "row": 23 + }, + "message": "Missing docstring in public class", + "noqa_row": 23, + "url": "https://docs.astral.sh/ruff/rules/undocumented-public-class" + }, + { + "cell": null, + "code": "D100", + "end_location": { + "column": 1, + "row": 1 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/models/rule.py", + "fix": null, + "location": { + "column": 1, + "row": 1 + }, + "message": "Missing docstring in public module", + "noqa_row": 1, + "url": "https://docs.astral.sh/ruff/rules/undocumented-public-module" + }, + { + "cell": null, + "code": "D101", + "end_location": { + "column": 22, + "row": 9 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/models/rule.py", + "fix": null, + "location": { + "column": 7, + "row": 9 + }, + "message": "Missing docstring in public class", + "noqa_row": 9, + "url": "https://docs.astral.sh/ruff/rules/undocumented-public-class" + }, + { + "cell": null, + "code": "D102", + "end_location": { + "column": 17, + "row": 15 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/models/rule.py", + "fix": null, + "location": { + "column": 9, + "row": 15 + }, + "message": "Missing docstring in public method", + "noqa_row": 15, + "url": "https://docs.astral.sh/ruff/rules/undocumented-public-method" + }, + { + "cell": null, + "code": "D101", + "end_location": { + "column": 11, + "row": 27 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/models/rule.py", + "fix": null, + "location": { + "column": 7, + "row": 27 + }, + "message": "Missing docstring in public class", + "noqa_row": 27, + "url": "https://docs.astral.sh/ruff/rules/undocumented-public-class" + }, + { + "cell": null, + "code": "D106", + "end_location": { + "column": 17, + "row": 28 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/models/rule.py", + "fix": null, + "location": { + "column": 11, + "row": 28 + }, + "message": "Missing docstring in public nested class", + "noqa_row": 28, + "url": "https://docs.astral.sh/ruff/rules/undocumented-public-nested-class" + }, + { + "cell": null, + "code": "D102", + "end_location": { + "column": 16, + "row": 41 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/models/rule.py", + "fix": null, + "location": { + "column": 9, + "row": 41 + }, + "message": "Missing docstring in public method", + "noqa_row": 41, + "url": "https://docs.astral.sh/ruff/rules/undocumented-public-method" + }, + { + "cell": null, + "code": "ANN201", + "end_location": { + "column": 19, + "row": 51 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/models/rule.py", + "fix": null, + "location": { + "column": 9, + "row": 51 + }, + "message": "Missing return type annotation for public function `is_fixable`", + "noqa_row": 51, + "url": "https://docs.astral.sh/ruff/rules/missing-return-type-undocumented-public-function" + }, + { + "cell": null, + "code": "D102", + "end_location": { + "column": 19, + "row": 51 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/models/rule.py", + "fix": null, + "location": { + "column": 9, + "row": 51 + }, + "message": "Missing docstring in public method", + "noqa_row": 51, + "url": "https://docs.astral.sh/ruff/rules/undocumented-public-method" + }, + { + "cell": null, + "code": "D100", + "end_location": { + "column": 1, + "row": 1 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/utils.py", + "fix": null, + "location": { + "column": 1, + "row": 1 + }, + "message": "Missing docstring in public module", + "noqa_row": 1, + "url": "https://docs.astral.sh/ruff/rules/undocumented-public-module" + }, + { + "cell": null, + "code": "D103", + "end_location": { + "column": 21, + "row": 14 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/utils.py", + "fix": null, + "location": { + "column": 5, + "row": 14 + }, + "message": "Missing docstring in public function", + "noqa_row": 14, + "url": "https://docs.astral.sh/ruff/rules/undocumented-public-function" + }, + { + "cell": null, + "code": "D103", + "end_location": { + "column": 17, + "row": 24 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/utils.py", + "fix": null, + "location": { + "column": 5, + "row": 24 + }, + "message": "Missing docstring in public function", + "noqa_row": 24, + "url": "https://docs.astral.sh/ruff/rules/undocumented-public-function" + }, + { + "cell": null, + "code": "D200", + "end_location": { + "column": 8, + "row": 53 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/utils.py", + "fix": { + "applicability": "unsafe", + "edits": [ + { + "content": "\"\"\"Creates a markdown table, and saves to a CSV\"\"\"", + "end_location": { + "column": 8, + "row": 53 + }, + "location": { + "column": 5, + "row": 51 + } + } + ], + "message": "Reformat to one line" + }, + "location": { + "column": 5, + "row": 51 + }, + "message": "One-line docstring should fit on one line", + "noqa_row": 53, + "url": "https://docs.astral.sh/ruff/rules/fits-on-one-line" + }, + { + "cell": null, + "code": "D202", + "end_location": { + "column": 8, + "row": 53 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/utils.py", + "fix": { + "applicability": "safe", + "edits": [ + { + "content": "", + "end_location": { + "column": 1, + "row": 54 + }, + "location": { + "column": 8, + "row": 53 + } + } + ], + "message": "Remove blank line(s) after function docstring" + }, + "location": { + "column": 5, + "row": 51 + }, + "message": "No blank lines allowed after function docstring (found 1)", + "noqa_row": 53, + "url": "https://docs.astral.sh/ruff/rules/no-blank-line-after-function" + }, + { + "cell": null, + "code": "D212", + "end_location": { + "column": 8, + "row": 53 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/utils.py", + "fix": { + "applicability": "safe", + "edits": [ + { + "content": "", + "end_location": { + "column": 5, + "row": 52 + }, + "location": { + "column": 8, + "row": 51 + } + } + ], + "message": "Remove whitespace after opening quotes" + }, + "location": { + "column": 5, + "row": 51 + }, + "message": "Multi-line docstring summary should start at the first line", + "noqa_row": 53, + "url": "https://docs.astral.sh/ruff/rules/multi-line-summary-first-line" + }, + { + "cell": null, + "code": "D400", + "end_location": { + "column": 8, + "row": 53 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/utils.py", + "fix": { + "applicability": "unsafe", + "edits": [ + { + "content": ".", + "end_location": { + "column": 49, + "row": 52 + }, + "location": { + "column": 49, + "row": 52 + } + } + ], + "message": "Add period" + }, + "location": { + "column": 5, + "row": 51 + }, + "message": "First line should end with a period", + "noqa_row": 53, + "url": "https://docs.astral.sh/ruff/rules/ends-in-period" + }, + { + "cell": null, + "code": "D401", + "end_location": { + "column": 8, + "row": 53 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/utils.py", + "fix": null, + "location": { + "column": 5, + "row": 51 + }, + "message": "First line of docstring should be in imperative mood: \"Creates a markdown table, and saves to a CSV\"", + "noqa_row": 53, + "url": "https://docs.astral.sh/ruff/rules/non-imperative-mood" + }, + { + "cell": null, + "code": "D415", + "end_location": { + "column": 8, + "row": 53 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/utils.py", + "fix": { + "applicability": "unsafe", + "edits": [ + { + "content": ".", + "end_location": { + "column": 49, + "row": 52 + }, + "location": { + "column": 49, + "row": 52 + } + } + ], + "message": "Add closing punctuation" + }, + "location": { + "column": 5, + "row": 51 + }, + "message": "First line should end with a period, question mark, or exclamation point", + "noqa_row": 53, + "url": "https://docs.astral.sh/ruff/rules/ends-in-punctuation" + }, + { + "cell": null, + "code": "D103", + "end_location": { + "column": 24, + "row": 68 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/utils.py", + "fix": null, + "location": { + "column": 5, + "row": 68 + }, + "message": "Missing docstring in public function", + "noqa_row": 68, + "url": "https://docs.astral.sh/ruff/rules/undocumented-public-function" + }, + { + "cell": null, + "code": "D200", + "end_location": { + "column": 8, + "row": 77 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/utils.py", + "fix": { + "applicability": "unsafe", + "edits": [ + { + "content": "\"\"\"Searches for common configuration files under the given directory.\"\"\"", + "end_location": { + "column": 8, + "row": 77 + }, + "location": { + "column": 5, + "row": 75 + } + } + ], + "message": "Reformat to one line" + }, + "location": { + "column": 5, + "row": 75 + }, + "message": "One-line docstring should fit on one line", + "noqa_row": 77, + "url": "https://docs.astral.sh/ruff/rules/fits-on-one-line" + }, + { + "cell": null, + "code": "D212", + "end_location": { + "column": 8, + "row": 77 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/utils.py", + "fix": { + "applicability": "safe", + "edits": [ + { + "content": "", + "end_location": { + "column": 5, + "row": 76 + }, + "location": { + "column": 8, + "row": 75 + } + } + ], + "message": "Remove whitespace after opening quotes" + }, + "location": { + "column": 5, + "row": 75 + }, + "message": "Multi-line docstring summary should start at the first line", + "noqa_row": 77, + "url": "https://docs.astral.sh/ruff/rules/multi-line-summary-first-line" + }, + { + "cell": null, + "code": "D401", + "end_location": { + "column": 8, + "row": 77 + }, + "filename": "/home/dor/adopt-ruff/.worktrees/adopt-ruff/adopt_ruff/utils.py", + "fix": null, + "location": { + "column": 5, + "row": 75 + }, + "message": "First line of docstring should be in imperative mood: \"Searches for common configuration files under the given directory.\"", + "noqa_row": 77, + "url": "https://docs.astral.sh/ruff/rules/non-imperative-mood" + } +] \ No newline at end of file From 3a986a321923e4ef9a12ae9ecb8577fbfbd435dc Mon Sep 17 00:00:00 2001 From: ScDor <18174994+ScDor@users.noreply.github.com> Date: Tue, 10 Feb 2026 22:21:11 +0200 Subject: [PATCH 5/5] chore: fix whitespace and end-of-file formatting --- rules_status.json | 2 +- skills/adopt-ruff/SKILL.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rules_status.json b/rules_status.json index 4f5ccd1..aff6f93 100644 --- a/rules_status.json +++ b/rules_status.json @@ -1057,4 +1057,4 @@ "noqa_row": 77, "url": "https://docs.astral.sh/ruff/rules/non-imperative-mood" } -] \ No newline at end of file +] diff --git a/skills/adopt-ruff/SKILL.md b/skills/adopt-ruff/SKILL.md index 9d533d9..9707d3e 100644 --- a/skills/adopt-ruff/SKILL.md +++ b/skills/adopt-ruff/SKILL.md @@ -32,7 +32,7 @@ Start with rules your codebase already obeys. Adopt rules that Ruff can fix for you. - **Identify:** Look at the "Autofixable Ruff rules" table. - **Batching:** Select 1-5 rules at a time. -- **Execute:** +- **Execute:** 1. Add rules to configuration. 2. Run `ruff check . --fix`. 3. Verify changes.