Skip to content

Conversation

@MichaReiser
Copy link
Member

@MichaReiser MichaReiser commented Jul 23, 2024

Summary

Fixes #12469

Test Plan

Running ruff with the given test snipped no longer panics when using rust nightly

Okay, I think the problem is the first return that higher prioritizes UnusedImport. The problem is that it violates

< is transitive: a < b and b < c implies a < c. The same must hold for both == and >.

Let's say we have

  • a: RedefinedWhileUnused with a min fix of 100
  • b: UnusedImport with a min fix of 0
  • c: any other rule with a min fix of 5

then:

@MichaReiser MichaReiser added the bug Something isn't working label Jul 23, 2024
@github-actions
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@MichaReiser MichaReiser merged commit 3af6ccb into main Jul 23, 2024
@MichaReiser MichaReiser deleted the fix-ord branch July 23, 2024 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ord violation panic when fixing file with nightly compiler

3 participants