Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider prefer_mixins #743

Closed
2 tasks
mit-mit opened this issue May 12, 2021 · 7 comments
Closed
2 tasks

Consider prefer_mixins #743

mit-mit opened this issue May 12, 2021 · 7 comments

Comments

@mit-mit
Copy link
Member

mit-mit commented May 12, 2021

We had initially selected prefer_mixins for inclusion in recommended lints, however ran into some issues that need resolving first, including:

@Levi-Lesches
Copy link

Many times, the class should be declared as mixin but just isn't for some reason. Having the lint in user code won't fix the problem, as the original API author is unaware and the user has no control of the declaration.

I believe new rules are being proposed in the language repo to prohibit mixing in non-mixin classes, so one side-effect is that the API author will be notified that they're not using mixin when testing their code.

@goderbauer
Copy link
Contributor

@goderbauer
Copy link
Contributor

Depending on how dart-lang/sdk#59039 gets resolved this may become obsolete.

@devoncarew devoncarew changed the title Consider 'prefer_mixins' Consider prefer_mixins Jun 1, 2023
@lrhn
Copy link
Member

lrhn commented Jun 7, 2023

The lint has been removed.

@lrhn lrhn closed this as completed Jun 7, 2023
@goderbauer
Copy link
Contributor

The lint has been removed.

As far as I can tell, this lint still exists [1] and from a recent discussion [2] it sounded like it was still relevant.

[1] https://dart-lang.github.io/linter/lints/prefer_mixin.html
[2] dart-lang/sdk#59039

@goderbauer goderbauer reopened this Jun 7, 2023
@lrhn
Copy link
Member

lrhn commented Jun 7, 2023

ACK, must have mistyped something.
Lint still exists, and still applies to pre-3.0 code.

@devoncarew
Copy link
Member

Closing - it's not clear this will help people in a pre-3.0 codebase or in a post-3.0 codebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

6 participants