Skip to content

fix: relax length comparison lint to skip non-empty checks#806

Merged
ivov merged 1 commit into
mainfrom
relax-is-empty-lint
Jun 21, 2026
Merged

fix: relax length comparison lint to skip non-empty checks#806
ivov merged 1 commit into
mainfrom
relax-is-empty-lint

Conversation

@ivov

@ivov ivov commented Jun 21, 2026

Copy link
Copy Markdown
Owner

The length comparison lint no longer flags non-empty checks. Forms like xs.length() > 0 and xs.length() != 0 are now left alone, because the only rewrite available is !xs.is_empty(), which is not simpler than the original.

Motivated by #804

@ivov ivov merged commit 95767d4 into main Jun 21, 2026
16 checks passed
@ivov ivov mentioned this pull request Jun 21, 2026
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.

1 participant