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

Magic number: rule is not supported in the diktat #767

Closed
orchestr7 opened this issue Feb 11, 2021 · 0 comments · Fixed by #772
Closed

Magic number: rule is not supported in the diktat #767

orchestr7 opened this issue Feb 11, 2021 · 0 comments · Fixed by #772
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@orchestr7
Copy link
Member

Need to think about the logic of detecting of Magic Numbers. Right now it is not supported in the diktat.
May be we should even do the following: for the very long mathematical expressions calculate them and insert into the code.

val a = someObj + (1 + 2 + 3) should trigger a warning that (1 + 2 + 3) should be moved to constant

@orchestr7 orchestr7 added bug Something isn't working enhancement New feature or request labels Feb 11, 2021
@orchestr7 orchestr7 assigned orchestr7, petertrr and kentr0w and unassigned orchestr7 Feb 11, 2021
@kentr0w kentr0w mentioned this issue Feb 12, 2021
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants