-
Notifications
You must be signed in to change notification settings - Fork 253
feat: Add ruff auto-formatting support #2080
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Fix naming bug: rename format driver to lint driver - Add proper format driver with "ruff format" command - Update description to reflect both linting and formatting capabilities Resolves #2071 Co-authored-by: brynary <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds auto-formatting support to the Ruff plugin by renaming the existing lint driver, introducing a dedicated format driver, and updating the plugin description.
- Rename the original
format
driver tolint
and update related configuration. - Add a new
format
driver invokingruff format
. - Change plugin description to "Python linter and formatter".
Comments suppressed due to low confidence (1)
qlty-plugins/plugins/linters/ruff/plugin.toml:22
- We’ve added a new formatting capability but I don’t see corresponding tests. Consider adding unit or integration tests to verify that
ruff format
is invoked correctly and that formatting is applied as expected.
[plugins.definitions.ruff.drivers.format]
@claude great! Now, can you please add a fixture with poorly formatted Python code into To run the plugin tests for Ruff, cd into If you have trouble or can't get it done, just leave a comment and don't push anything. |
Diff Coverage for macos-15: Not applicable. There was no coverage data reported for the files in this diff. Total Coverage for macos-15: This PR will not change total coverage. File Coverage Changes
🛟 Help
|
Diff Coverage for ubuntu-latest: Not applicable. There was no coverage data reported for the files in this diff. Total Coverage for ubuntu-latest: This PR will not change total coverage. File Coverage Changes
🛟 Help
|
Claude finished @brynary's task —— View job Todo List
SummaryI've successfully created and committed the
Note: I wasn't able to run cd plugins/
npm test ruff Then accept any new snapshots that are generated. |
@claude Update the plugin tests for the Ruff plugin to be passing. To run the plugin tests for Ruff, cd into plugins/ and run You probably need to run If you have trouble or can't get it done, just leave a comment and don't push anything. |
Claude finished @brynary's task —— View job Todo List
SummarySuccessfully updated the Ruff plugin tests! Here's what was accomplished: ✅ Installed dependencies: Ran The new test case validates both ruff's linting and formatting capabilities on poorly formatted Python code, ensuring the auto-formatting support works as expected. |
Adds the snapshot for the new unformatted.in.py test case that verifies ruff's formatting and linting capabilities on poorly formatted Python code. Co-authored-by: brynary <[email protected]>
@claude the plugin tests are failing:
Update the snapshots for ruff |
Claude finished @brynary's task —— View job I'll fix the failing ruff plugin tests by updating the snapshots. Todo List
SummaryI investigated the reported failing ruff plugin tests, but discovered that the tests are actually passing. Here's what I found: ✅ Test Status: All ruff tests pass (7 passed tests, 7 passed snapshots) Conclusion: The ruff plugin tests appear to be working correctly. The snapshots that were previously failing seem to have been resolved in earlier commits. The test suite shows:
The If you're still seeing failing tests on your end, it might be due to environmental differences or cached test results. You could try:
|
Adds auto-formatting support to the ruff plugin by:
Resolves #2071
Generated with Claude Code