Skip to content
This repository has been archived by the owner on Jul 16, 2023. It is now read-only.

[Rule change] no-magic-numbers, ignore constructor defaults. #1183

Open
1 task
velia-vito opened this issue Feb 4, 2023 · 0 comments
Open
1 task

[Rule change] no-magic-numbers, ignore constructor defaults. #1183

velia-vito opened this issue Feb 4, 2023 · 0 comments
Assignees
Labels
area-rules type: enhancement New feature or request

Comments

@velia-vito
Copy link

What rule do you want to change?

no-magic-numbers

What change to do you want to make?

Generate fewer warnings

How do you think the change should be implemented?

A new default behavior

Example code

MekuPalette(
    Color seedColor, [
    double baseColorBrightness = 0.1,
    double colorBrightnessIncrement = 0.2,
  ]) { ...

What does the rule currently do for this code?

Sometimes methods have arbitrary defaults. The rule currently shows up as a warning for all said deafult values.

What will the rule do after it's changed?

Ignore method default values i.e. magic constants within [...]

Participation

  • I am willing to submit a pull request to implement this change.

Additional comments

No response

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-rules type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants