Skip to content

prefer_mixin should not warn about non-super-mixin classes #57802

Closed
@yjbanov

Description

@yjbanov

Per dart-lang/language#32 many non-super-mixins will have to remain as classes indefinitely. Because the warnings from prefer_mixin show up at mixin application sites, and not at mixin declaration sites, it is not practical for it to warn about them. Mixin declarations are rare. Flutter declares them and makes developers apply them, but few other libraries and frameworks do. Therefore, the user who is applying the mixin rarely has the ability to change the mixin declaration.

Instead prefer_mixin should only warn about super-mixins, not regular mixins. Perhaps we should also use a different name for this lint. prefer_mixin_supermixin?

@leafpetersen @lrhn @eernstg @Hixie

Metadata

Metadata

Assignees

No one assigned

    Labels

    devexp-linterIssues with the analyzer's support for the linter packagelegacy-area-analyzerUse area-devexp instead.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions