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

fix: ignore enum constant arguments for no-magic-number #1150

Conversation

nxtSwitch
Copy link
Contributor

What is the purpose of this pull request? (put an "X" next to an item)

  • Documentation update
  • Bug fix
  • New rule
  • Changes an existing rule
  • Add autofixing to a rule
  • Add a CLI option
  • Add something to the core
  • Other, please explain:

What changes did you make? (Give an overview)

Ignoring numbers in enum

Example
enum ExitCode {
  /// The successful exit.
  success(0),

  /// The command was used incorrectly.
  usage(64),

  /// An internal software error has been detected.
  software(70),

  /// Something was found in an unconfigured or misconfigured state.
  config(78);

  final int code;

  const ExitCode(this.code);
}

@incendial incendial self-requested a review January 13, 2023 12:05
@incendial incendial added this to the 5.5.0 milestone Jan 13, 2023
@incendial
Copy link
Member

@nxtSwitch thank you for the fix! Could you please update the changelog?

@codecov
Copy link

codecov bot commented Jan 13, 2023

Codecov Report

Merging #1150 (bcf88cd) into master (91cfb6a) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head bcf88cd differs from pull request most recent head 24a5375. Consider uploading reports for the commit 24a5375 to get more accurate results

@@           Coverage Diff           @@
##           master    #1150   +/-   ##
=======================================
  Coverage   85.53%   85.53%           
=======================================
  Files         350      350           
  Lines        7893     7897    +4     
=======================================
+ Hits         6751     6755    +4     
  Misses       1142     1142           
Impacted Files Coverage Δ
...les_list/no_magic_number/no_magic_number_rule.dart 93.47% <100.00%> (+0.62%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@incendial
Copy link
Member

@nxtSwitch thank you for the contribution!

@incendial incendial merged commit 7f9e642 into dart-code-checker:master Jan 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants