Skip to content

buildifier false pos on >>= operator #1330

@carpenterjc

Description

@carpenterjc

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions