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

buildifier false pos on >>= operator #1330

Open
carpenterjc opened this issue Jan 31, 2025 · 0 comments
Open

buildifier false pos on >>= operator #1330

carpenterjc opened this issue Jan 31, 2025 · 0 comments

Comments

@carpenterjc
Copy link

carpenterjc commented Jan 31, 2025

example code

def foo(num):
    num >>= 4
    return num

result no-effect: Expression result is not used. (https://github.com/bazelbuild/buildtools/blob/main/WARNINGS.md#no-effect)

These operators do have an effect, and you can clearly see the number shifting if you print num before and after.

Tested with 8.0.2

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

No branches or pull requests

1 participant