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

feat!: [DX-3563] Upgrade to DCM 1.25.0 #717

Merged
merged 1 commit into from
Dec 10, 2024
Merged

feat!: [DX-3563] Upgrade to DCM 1.25.0 #717

merged 1 commit into from
Dec 10, 2024

Conversation

witwash
Copy link
Contributor

@witwash witwash commented Dec 9, 2024

Summary

Upgrade to DCM 1.25.0

Enabled rules:

Common:
avoid-unnecessary-patterns

Flutter:
prefer-container

Bloc:
emit-new-bloc-state-instances
avoid-bloc-public-fields
prefer-bloc-state-suffix

prefer-bloc-event-suffix

avoid-instantiating-in-bloc-value-provider
avoid-existing-instances-in-bloc-provider

Rules left disabled:

avoid-single-field-destructuring and
prefer-assigning-await-expressions - there are a lot of cases where it is used in tech-mo. I am not sure it is worth refactoring
record-fields-ordering - I don't think it is needed
avoid-returning-value-from-cubit-methods - we have avoid-cubits and don't use them, so this one is not needed as well
prefer-immutable-bloc-state - doesn't support freezed
prefer-immutable-bloc-events - doesn't support freezed

Testing steps

Info about test cases. If you think the issue is not testable, describe why.

Follow-up issues

Is there some action/cleanup needed after this PR is merged or deployed (e.g. consolidate some part outside the scope of this PR, etc)? Create issues for it with deadline and note them here and in the PR comments.

Check during review

  • Verify against Jira issue.
  • Is the PR over 300 additions? Consider rejecting it with advice to split it. Is it over 500 additions? It should definitely be rejected.
  • Unused code removed.
  • Build passing.
  • Is it a bug fix? Check that it is covered by a proper test (unit or integration).

@witwash witwash marked this pull request as ready for review December 10, 2024 10:17
@witwash witwash requested a review from a team as a code owner December 10, 2024 10:17
@witwash witwash requested a review from ookami-kb December 10, 2024 10:17
@ookami-kb
Copy link
Contributor

Do prefer-immutable-bloc-state and prefer-immutable-bloc-events work correctly with freezed classes (i.e. does it recognize them as immutable)?

@witwash
Copy link
Contributor Author

witwash commented Dec 10, 2024

@ookami-kb,
Well, it does not
CleanShot 2024-12-10 at 11 55 58@2x
But it can be auto-fixed or fixed from the suggestion by adding @immutable

@ookami-kb
Copy link
Contributor

@witwash I would rather disable these rules then. We always use freezed for both state and events anyway, so this seems like an extra work.

@witwash
Copy link
Contributor Author

witwash commented Dec 10, 2024

@ookami-kb, done

@witwash witwash merged commit bc2d404 into main Dec 10, 2024
7 checks passed
@witwash witwash deleted the DX-3563 branch December 10, 2024 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants