Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sqf: Add lint (S26) for short circuit on bool vars #872

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

PabstMirror
Copy link
Collaborator

_test1 && _test2 is faster than _test1 && {_test2}

But (!isNil "z") && {z} is not safe to convert if z is nil

So will probably have to be default off

Copy link

codecov bot commented Jan 18, 2025

Codecov Report

Attention: Patch coverage is 72.00000% with 28 lines in your changes missing coverage. Please review.

Project coverage is 67.6%. Comparing base (62cc0ba) to head (5eaa16f).
Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
...qf/src/analyze/lints/s26_short_circuit_bool_var.rs 72.0% 28 Missing ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
...qf/src/analyze/lints/s26_short_circuit_bool_var.rs 72.0% <72.0%> (ø)

... and 11 files with indirect coverage changes

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