Duplicate ignore must_be_immutable
#795
Labels
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
must_be_immutable
#795
At the start of the generated mock files, Mockito puts a
// ignore_for_file: must_be_immutable
directive.For immutable classes Mockito additionally puts another
// ignore: must_be_immutable
.This generates the following analyzer warning:
The diagnostic 'must_be_immutable' doesn't need to be ignored here because it's already being ignored.
Try removing the name from the list, or removing the whole comment if this is the only name in the list.
dart(duplicate_ignore)
Either the local ignore (for specific classes) or the global ignore (for the entire class) needs to be removed. It does not seem to matter which one, though keeping the global ignore for the entire file and removing the one specific to immutable classes seems to be the easier way that reduces complexity.
The text was updated successfully, but these errors were encountered: