felangel / mocktail

A mock library for Dart inspired by mockito
https://pub.dev/packages/mocktail
MIT License
617 stars 81 forks source link

feat(mocktail_lint): mocktail `mocktail_prefer_private_mocks` custom lint rule #182

Closed alestiago closed 1 year ago

alestiago commented 1 year ago

Status

IN DEVELOPMENT

TODO: add more tests, add workflows, add README.md

Breaking Changes

NO

Description

Creates an entire new package, namely mocktail_lints. This package builds on top of custom_lints (https://pub.dev/packages/custom_lint).

The idea is to include rules that encourage good usage of the package. Like for example private mocks or #146.

This PR adds a single lint rule, named mocktail_prefer_private_mocks that encourages the use of private Mock subclasses over public ones. This PR doesn't add a quickfix for this lint rule (I plan to add the quick-fix later if we like this idea the same applies for other lint rules that might be useful).

Type of Change

alestiago commented 1 year ago

Before moving forward with this PR, we will be analysing the performance of custom_lint in big codebases with multiple plugins.

felangel commented 1 year ago

Closing this for now since it's been a while. Feel free to reopen this in the future if it makes sense based on the findings ๐Ÿ‘