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

Warn on 2 ^ n - author usually intends 2 ** n #15091

Open
Zac-HD opened this issue Dec 21, 2024 · 1 comment
Open

Warn on 2 ^ n - author usually intends 2 ** n #15091

Zac-HD opened this issue Dec 21, 2024 · 1 comment
Labels
needs-decision Awaiting a decision from a maintainer rule Implementing or modifying a lint rule

Comments

@Zac-HD
Copy link

Zac-HD commented Dec 21, 2024

It's pretty rare for people to actually intend to do bitwise-or with constants; making this a lint error when the "base" is either 2 or 10 would likely save quite a few people some frustrating debugging (or silent errors)

@MichaReiser MichaReiser added rule Implementing or modifying a lint rule needs-decision Awaiting a decision from a maintainer labels Dec 21, 2024
@MichaReiser
Copy link
Member

Thanks for opening this rule proposal.

I think we have to wait before #1774 is complete to add this rule because it is a "restriction" lint and somewhat opinionated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-decision Awaiting a decision from a maintainer rule Implementing or modifying a lint rule
Projects
None yet
Development

No branches or pull requests

2 participants