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

Linter: add "hard-coded constant" warning #503

Open
Tracked by #501
mtshiba opened this issue Mar 24, 2024 · 0 comments
Open
Tracked by #501

Linter: add "hard-coded constant" warning #503

mtshiba opened this issue Mar 24, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers lint

Comments

@mtshiba
Copy link
Member

mtshiba commented Mar 24, 2024

Tracking issue: #501

We would like to warn code like:

print! 3.141592653589793 # use math.pi
print! 2.718281828459045 # use math.e

Constants that can be referenced should be displayed as hints instead of hard-coded values.

(It would be nice to be able to warn about values that match constants that exist in the standard library in addition to numerical values.)

@mtshiba mtshiba added enhancement New feature or request good first issue Good for newcomers lint labels Mar 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers lint
Projects
None yet
Development

No branches or pull requests

1 participant