Repository navigation
ci: ruff: add explicit config - #1662
Merged
Merged
Conversation
As of ruff version 0.16.0, the default behavior of 'ruff lint' has changed from doing a subset of checks to doing all checks, including those from flake8-bugbear, pyupgrade, Pylint, and flake8-simplify. This causes a huge amount of noise in a simple 'ruff check' run, so revert the checks to just those we've been using (i.e., the old default set). Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1662 +/- ##
===========================================
+ Coverage 80.75% 91.36% +10.60%
===========================================
Files 15 20 +5
Lines 977 2108 +1131
===========================================
+ Hits 789 1926 +1137
+ Misses 188 182 -6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Member
|
Sounds good but shouldn't we also work on making all ruff checks happy? |
Contributor
Author
That would be a massive undertaking, with mostly a lot of code churn for no benefit. The "ALL" setting calls even the tiniest lint an error, just for fun try picking through the noise in just one file that was considered clean before ruff 0.16.0. $ ruff check --select ALL asu/build.py
warning: `incorrect-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible. Ignoring `incorrect-blank-line-before-class`.
warning: `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible. Ignoring `multi-line-summary-second-line`.
D100 Missing docstring in public module
--> asu/build.py:1:1
I001 [*] Import block is un-sorted or un-formatted
--> asu/build.py:1:1
|
1 | / import datetime
2 | | import json
... blah blah blah for 900 lines ...
Found 68 errors.
[*] 20 fixable with the `--fix` option (6 hidden fixes can be enabled with the `--unsafe-fixes` option). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As of ruff version 0.16.0, the default behavior of 'ruff lint' has changed from doing a subset of checks to doing all checks, including those from flake8-bugbear, pyupgrade, Pylint, and flake8-simplify. This causes a huge amount of noise in a simple 'ruff check' run, so revert the checks to just those we've been using (i.e., the old default set).