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

Feature request: Nolint rule for special cases, e.g. base 2 numbers #38

Open
chibera opened this issue Apr 30, 2024 · 0 comments
Open

Comments

@chibera
Copy link

chibera commented Apr 30, 2024

Short summary

Base 2 numbers are fairly common in a lot of code bases.
2, 4, 8, 16, 32, 64 being the most common.

Another common pattern is base 10 numbers, 10, 100, 1000 etc.

It would be a nice to have feature to allow globally disabling mnd alerts on these cases.
e.g. in yaml

mnd:
  ignored-ranges:
    - base2
    - base10

Steps to reproduce the behavior

Write code using magic numbers

go-mnd version or commit ref

v2.5.1

Go version (output of 'go version')

1.22.2

Operating system / Environment

darwin / arm64 macos

Expected behavior

Allow skipping numerical ranges

Actual behavior

Need to add nolint mnd inline in a lot of places

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant