rule for always false condition
Open
rule
- Dominant language
- Rust
- Stars
- 49.6k
- Forks
- 2.4k
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 458
Description
new_header is an int type
below condition can never be satisfied, any rule to highlight this?
`if new_header and new_header == 0:`
Contributor guide
Research direction
Start by examining Ruff’s existing rule definitions and tests for comparable always-false or redundant-condition diagnostics, then reproduce the Python example from the issue. Clarify the intended truthiness semantics and confirm that the finished rule reports this condition with regression coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100