-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
rule-requestRequests for a new rules.Requests for a new rules.
Description
New Issue Checklist
- Updated SwiftLint to the latest version
- I searched for existing GitHub issues
New rule request
Please describe the rule idea, format
this issue's title as Rule Request: [Rule Name]
and describe:
-
Why should this rule be added? Share links to existing discussion about what
the community thinks about this.
https://eslint.org/docs/latest/rules/no-magic-numbers -
Provide several examples of what would and wouldn't trigger violations.
Basically, when you use a number without giving it some context.
Circle()
.fill(Color.primary.opacity(isAnimate ? 0.1 : 1.0 )) // magic numbers
.frame(
width: 10, // magic number
height: 10
)
-
Should the rule be configurable, if so what parameters should be configurable?
No -
Should the rule be opt-in or enabled by default? Why?
It should be optional
douglasdrumond, ronualdo, vlvs, vitorAlmeidaDev, Master-Code-Programmer and 1 more
Metadata
Metadata
Assignees
Labels
rule-requestRequests for a new rules.Requests for a new rules.