Skip to content

ci: ruff: add explicit config - #1662

Merged
aparcar merged 1 commit into
openwrt:mainfrom
efahl:ruff-config
Aug 18, 2026
Merged

aparcar merged 1 commit into
openwrt:mainfrom
efahl:ruff-config

Conversation

@efahl

@efahl efahl commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

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).

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

codecov Bot commented Aug 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.36%. Comparing base (5e65dec) to head (e3f7510).
⚠️ Report is 418 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@aparcar

aparcar commented Aug 18, 2026

Copy link
Copy Markdown
Member

Sounds good but shouldn't we also work on making all ruff checks happy?

@aparcar
aparcar merged commit 34c3b31 into openwrt:main Aug 18, 2026
5 of 6 checks passed
@efahl

efahl commented Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

Sounds good but shouldn't we also work on making all ruff checks happy?

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants