-
Notifications
You must be signed in to change notification settings - Fork 39
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
Unsigned integer literal is perhaps incorrectly marked as a MAGIC_NUMBER #1224
Comments
MAGIC_NUMBER
Oh, looks like we missed this, we only added workarounds for 0,1,2. Should add the same for @michaelkeeling, thank you for this report, sorry that we missed this issue, because of the current situation :( |
### What's done: * fixed ignore number in MAGIC_NUMBER rule Closes #1224
### What's done: * fixed ignore number in MAGIC_NUMBER rule Closes #1224
Actually, we already support setting custom numbers allowed by this rule. In - name: MAGIC_NUMBER
enabled: true
configuration:
ignoreNumbers: 1,2,0U,1U,2U But sure, literals for longs and unsigned numbers will be supported out-of-the-box as well. |
### What's done: * fixed ignore number in MAGIC_NUMBER rule Closes #1224
### What's done: * fixed ignore number in MAGIC_NUMBER rule Closes #1224
### What's done: * fixed ignore number in MAGIC_NUMBER rule Closes #1224
### What's done: * fixed ignore number in MAGIC_NUMBER rule Closes #1224
### What's done: * fixed ignore number in MAGIC_NUMBER rule Closes #1224
### What's done: * fixed ignore number in MAGIC_NUMBER rule Closes #1224
Describe the bug
Unsigned integer literal is perhaps incorrectly marked as a
MAGIC_NUMBER
Expected behavior
The rules for unsigned numeric values should be the same as the signed counterparts.
Observed behavior
Unsigned integer literal is incorrectly marked as a
MAGIC_NUMBER
Steps to Reproduce
Assign an unsigned integer to a variable.
Environment information
The text was updated successfully, but these errors were encountered: