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

CPLAT-9205 Codemod for New Boilerplate #72

Merged
merged 208 commits into from
Mar 4, 2020

Conversation

sydneyjodon-wk
Copy link
Contributor

@sydneyjodon-wk sydneyjodon-wk commented Jan 28, 2020

Motivation

New over_react component boilerplate is coming soon, and our consumers deserve an easy way to make use of it!

Changes

Release Notes

Add codemod to assist over_react consumers in their migration to the new boilerplate changes.

Review

See CONTRIBUTING.md for more details on review types (+1 / QA +1 / +10) and code review process.

Please review:

QA Checklist

  • Tests were updated and provide good coverage of the changeset and other affected code
  • Manual testing was performed if needed
    • Steps from PR author:
      • Run the boilerplate codemod on web_skin_dart and verify that the codemod updates props and state classes as expected.
        • pub global run over_react_codemod:boilerplate_upgrade
    • Anything falling under manual testing criteria outlined in CONTRIBUTING.md

Merge Checklist

While we perform many automated checks before auto-merging, some manual checks are needed:

  • A Client Platform member has reviewed these changes
  • There are no unaddressed comments - this check can be automated if reviewers use the "Request Changes" feature
  • For release PRs - Version metadata in Rosie comment is correct

@sydneyjodon-wk sydneyjodon-wk changed the title Add base files CPLAT-9205 Codemod for New Boilerplate Jan 28, 2020
@aviary3-wk
Copy link

Security Insights

No security relevant content was detected by automated scans.

Action Items

  • Review PR for security impact; comment "security review required" if needed or unsure
  • Verify aviary.yaml coverage of security relevant code

Questions or Comments? Reach out on Slack: #support-infosec.

class _$AbstractBreadcrumbPathProps extends AbstractGraphFormProps
with
BreadcrumbPathPropsMixin,
// ignore: mixin_of_non_class, undefined_clas
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the ignore comment is at the end of a line, it'll get applied to this line, and not the subsequent line.

So, in this case, $UnconvertedMixin would still have an analysis error.

We need this comment to be on its own line:

Suggested change
// ignore: mixin_of_non_class, undefined_clas
with ${publicPropsClassName}Mixin, ConvertedMixin, UnconvertedMixin,
// ignore: mixin_of_non_class, undefined_class
\$UnconvertedMixin;

Doesn't matter where the comment goes so long as it has one space of between it and the start of the line; dartfmt will handle it:

@Props()
class FooProps = UiProps with
 FooPropsMixinn,
 ConvertedMixin,
 UnconvertedMixin,
 // ignore: mixin_of_non_class, undefined_class
 $UnconvertedMixin;

Formatted

@Props()
class FooProps = UiProps
    with
        FooPropsMixinn,
        ConvertedMixin,
        UnconvertedMixin,
        // ignore: mixin_of_non_class, undefined_class
        $UnconvertedMixin;

sydneyjodon-wk and others added 6 commits March 3, 2020 09:27
…sume-SemverHelper

# Conflicts:
#	lib/src/boilerplate_suggestors/advanced_props_and_state_class_migrator.dart
#	lib/src/boilerplate_suggestors/boilerplate_utilities.dart
#	lib/src/boilerplate_suggestors/simple_props_and_state_class_migrator.dart
…d__final-cleanup

Final cleanup for new boilerplate codemod
@aaronlademann-wf aaronlademann-wf marked this pull request as ready for review March 4, 2020 16:48
Copy link
Contributor

@aaronlademann-wf aaronlademann-wf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 / QA +1

All changes were reviewed and tested in the individual PRs that merged into this integration branch (listed in the PR description).

Holistically tested via #80 as it was the last PR to go into integration.

Copy link
Contributor

@joebingham-wk joebingham-wk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@joebingham-wk
Copy link
Contributor

@Workiva/release-management-p

Copy link

@rmconsole-wf rmconsole-wf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 from RM

@rmconsole7-wk rmconsole7-wk merged commit 66a27be into master Mar 4, 2020
@rmconsole7-wk rmconsole7-wk deleted the CPLAT-9205-new-boilerplate-codemod branch March 4, 2020 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants