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

Default the assert rule to be disabled #641

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

ericwb
Copy link
Contributor

@ericwb ericwb commented Oct 16, 2024

The point of the assert rule is to catch scenarios where Python builtin assert is used to guard or as a conditional in functions and not realize that running Python with optimizations (-O) would remove those assert statements.

However, in practice, its unlikely folks use the optimize compile option as it doesn't provide much "optimization" anyway. Frankly it does very very little. Therefore this change defaults the assert rule to disabled to cut down on noise and probably false positives.

The point of the assert rule is to catch scenarios where Python
builtin assert is used to guard or as a conditional in functions
and not realize that running Python with optimizations (-O) would
remove those assert statements.

However, in practice, its unlikely folks use the optimize compile
option as it doesn't provide much "optimization" anyway. Frankly
it does very very little. Therefore this change defaults the
assert rule to disabled to cut down on noise and probably false
positives.

Signed-off-by: Eric Brown <[email protected]>
@ericwb ericwb merged commit 28fd668 into securesauce:main Oct 16, 2024
20 checks passed
@ericwb ericwb deleted the disable_assert branch October 16, 2024 05:19
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