Skip to content

Commit

Permalink
Minor naming improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
vova-beloded-solid committed Nov 16, 2023
1 parent 535db47 commit 028b135
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/lints/no_magic_number/no_magic_number_rule.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class NoMagicNumberRule extends SolidLintRule<NoMagicNumberParameters> {
.where(_isNotInsideIndexExpression)
.where(_isNotInsideEnumConstantArguments)
.where(_isNotDefaultValue)
.where(_isNotConstructorInitializer);
.where(_isNotInConstructorInitializer);

for (final magicNumber in magicNumbers) {
reporter.reportErrorForNode(code, magicNumber);
Expand Down Expand Up @@ -129,7 +129,7 @@ class NoMagicNumberRule extends SolidLintRule<NoMagicNumberParameters> {
return literal.thisOrAncestorOfType<DefaultFormalParameter>() == null;
}

bool _isNotConstructorInitializer(Literal literal) {
bool _isNotInConstructorInitializer(Literal literal) {
return literal.thisOrAncestorOfType<ConstructorInitializer>() == null;
}
}

0 comments on commit 028b135

Please sign in to comment.