Skip to content

Fix new Rubocop offences#6128

Closed
mamhoff wants to merge 1 commit intosolidusio:mainfrom
mamhoff:fix-delegate-offenses
Closed

Fix new Rubocop offences#6128
mamhoff wants to merge 1 commit intosolidusio:mainfrom
mamhoff:fix-delegate-offenses

Conversation

@mamhoff
Copy link
Copy Markdown
Contributor

@mamhoff mamhoff commented Feb 17, 2025

Summary

We like to use delegate now.

Checklist

Check out our PR guidelines for more details.

The following are mandatory for all PRs:

The following are not always needed:

  • 📖 I have updated the README to account for my changes.
  • 📑 I have documented new code with YARD.
  • 🛣️ I have opened a PR to update the guides.
  • ✅ I have added automated tests to cover my changes.
  • 📸 I have attached screenshots to demo visual changes.

We like to use `delegate` now.
@mamhoff mamhoff requested a review from a team as a code owner February 17, 2025 21:18
@github-actions github-actions Bot added changelog:solidus_core Changes to the solidus_core gem changelog:solidus_admin changelog:solidus_legacy_promotions Changes to the solidus_legacy_promotions gem changelog:solidus_promotions Changes to the solidus_promotions gem labels Feb 17, 2025
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.66%. Comparing base (7205ff0) to head (bfab4e8).
Report is 15 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6128      +/-   ##
==========================================
+ Coverage   86.56%   88.66%   +2.09%     
==========================================
  Files         512      833     +321     
  Lines       11838    18062    +6224     
==========================================
+ Hits        10248    16015    +5767     
- Misses       1590     2047     +457     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Copy Markdown
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

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

Can we ignore this rule?

def line_item_comparison_hooks
Spree::Config.line_item_comparison_hooks
end
delegate :line_item_comparison_hooks, to: :'Spree::Config'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am not sure I am fan of this. We should probably adjust the Rubocop rules or use standard instead.

@tvdeyen
Copy link
Copy Markdown
Member

tvdeyen commented Feb 18, 2025

@mamhoff needs to be rebased on #6131

@tvdeyen
Copy link
Copy Markdown
Member

tvdeyen commented Feb 18, 2025

Closed in favor of #6131

@tvdeyen tvdeyen closed this Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog:solidus_admin changelog:solidus_core Changes to the solidus_core gem changelog:solidus_legacy_promotions Changes to the solidus_legacy_promotions gem changelog:solidus_promotions Changes to the solidus_promotions gem

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants