-
-
Notifications
You must be signed in to change notification settings - Fork 388
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
WPS432 should preserve the literal representation #1402
Comments
Yes, I agree. Thanks a lot for the bug report! |
Hey! Can I take this one? Thanks. |
@hhsdev thanks! |
@sobolevn Hi! I am having some trouble implementing this. Could you give me some advice? tl:dr; I think the implementation needs both Currently, However, in order to preserve literal representation, we must use The current solution I'm thinking of is to subclass both Problem is, I don't see any visitor that inherits from multiple visitors (apart from I think I'm missing something. But I don't know what I'm missing. Can you give some advice on how to go about this? Thanks in advance! |
Then you should probably use |
Nice! Will wait for the PR. |
Bug report
This code
causes
WPS432: Found magic number: 448
It's unobvious that it's the same number and it's impossible to use
448
in grep because it won't find anything.What's wrong
Non-decimal numbers are reported as decimal. Also, maybe for things like
chmod()
it's okay to allow such "magic numbers" because this form directly relates to a normal syscall or a CLI command one would make.How is that should be
The formatting should be preserved. The error should've been
WPS432: Found magic number: 0o700
instead.System information
N/A
The text was updated successfully, but these errors were encountered: