felangel / equatable

A Dart package that helps to implement value based equality without needing to explicitly override == and hashCode.

Home Page:https://pub.dev/packages/equatable

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Provide lint for forgotten fields in props

petrnymsa opened this issue · comments

It would be nice to have some kind of lint, which will warn about the forgotten field in props. Most of the time, any public field of the class has to be included in props.

We have some automation with help of extensions in IDE for generating props but it cant prevent bugs by forgetting to update the props field.

@felangel is this a feasible feature? I want to play around with this.

A lint rule to validate forgotten fields is now available in DCM https://dartcodemetrics.dev/docs/rules/common/list-all-equatable-fields. Feedback is very welcome!

Thanks so much @incendial 💯