8000 Linter: add "hard-coded constant" warning · Issue #503 · erg-lang/erg · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
8000
Linter: add "hard-coded constant" warning #503
Open
@mtshiba

Description

@mtshiba

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.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0