Fail CI on new linter ecosystem panics by ntBre · Pull Request #23597 · astral-sh/ruff (original) (raw)
added 2 commits
Summary
The huge number of changes in
#22205 (comment) should have
obviously been a red flag, but I think it would be nice if CI failed when new
ecosystem panics were introduced. This PR adds a check for diagnostic lines that
start with panic: Panicked at crates/, raises a ToolError if any are found
in the results from the comparison executable, and then also exits non-zero if
any errors are returned.
If exiting non-zero is going too far, we could also just raise the ToolError,
as that will at least trigger this message, which was not the case on the
PLR1712 PR:
Another option would be not to exit zero if Ruff panics, even if --exit-zero
is used, but I saw that ty has the same behavior and assumed that that was
intentional.
Test Plan
Local testing on the 0.15.3 tag showing that ruff-ecosystem exited non-zero. I can also introduce a panic into a lint rule to test this in CI
Related to internal CI tooling
label
ntBre marked this pull request as ready for review
ntBre changed the title
Raise Raise ToolError and exit non-zero on ecosystem panicsToolError and fail CI on new ecosystem panics
ntBre changed the title
Raise Fail CI on new linter ecosystem panicsToolError and fail CI on new ecosystem panics
ntBre deleted the brent/ecosystem-panic branch
carljm added a commit that referenced this pull request
- main:
[ty] Split up
types/class.rs(#23714) [ty] Rework module resolution to be breadth-first instead of depth-first (#22449) [ty] Move tests and type-alias-related code out oftypes.rs(#23711) [ty] Move TypeVar-related code to atypes::typevarsubmodule (#23710) Fail CI on new linter ecosystem panics (#23597) [ty] Fix handling of non-Python text documents [ty] MoveCallableType, and related methods/types, to a newtypes::callablesubmodule (#23707) [ty] Avoid stack overflow with recursive typevar (#23652) [ty] Add a diagnostic for an unused awaitable (#23650) [ty] Fix union*argsbinding for optional positional parameters (#23124) [refurb] FixFURB101andFURB103false positives when I/O variable is used later (#23542) [ty] Fix type checking for multi-member enums within in a function block (#23683) [ty] Improve folding for decorators (#23543) [airflow] Extract common utilities for use in new rules (#23630)
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
[ Show hidden characters]({{ revealButtonHref }})