Skip to content

Appease Rubocop#6317

Merged
tvdeyen merged 1 commit intosolidusio:mainfrom
SuperGoodSoft:chore-stock-item-rubocop-lint
Aug 9, 2025
Merged

Appease Rubocop#6317
tvdeyen merged 1 commit intosolidusio:mainfrom
SuperGoodSoft:chore-stock-item-rubocop-lint

Conversation

@benjaminwil
Copy link
Contributor

Summary

On two of my recent PRs, Rubocop got mad at the code in this commit body even though neither of my PRs touched this file. Thanks, Rubocop.

For posterity, here is the failure from this GitHub Actions run:

Run bin/rake lint:rb
bundle exec rubocop -P -f clang -f junit -o '/home/runner/work/solidus/solidus/tasks/../test-results/rubocop-results.xml' $(git ls-files -co --exclude-standard | grep -E "\.rb$" | grep -v "/templates/")
core/app/models/spree/stock_item.rb:109:9: C: [Correctable] Style/RedundantParentheses: Don't use parentheses around a method call.
        (saved_change_to_count_on_hand&.any? { |cache| cache < inventory_cache_threshold }) ||
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

1878 files inspected, 1 offense detected, 1 offense autocorrectable
rake aborted!
Command failed with status (1): [bundle exec rubocop -P -f clang -f junit -o '/home/runner/work/solidus/solidus/tasks/../test-results/rubocop-results.xml' $(git ls-files -co --exclude-standard | grep -E "\.rb$" | grep -v "/templates/")]
/home/runner/work/solidus/solidus/tasks/linting.rake:7:in `block (2 levels) in <top (required)>'
/home/runner/work/solidus/solidus/vendor/bundle/ruby/3.2.0/gems/rake-13.3.0/exe/rake:27:in `<top (required)>'
Tasks: TOP => lint:rb
(See full trace by running task with --trace)
Error: Process completed with exit code 1.

Checklist

The following are mandatory for all PRs:

On two of my recent PRs, Rubocop got mad at the code in this commit
body even though neither of my PRs touched this file. Thanks, Rubocop.
@benjaminwil benjaminwil requested a review from a team as a code owner August 8, 2025 22:34
@github-actions github-actions bot added the changelog:solidus_core Changes to the solidus_core gem label Aug 8, 2025
@codecov
Copy link

codecov bot commented Aug 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.34%. Comparing base (fa8e686) to head (01e54fe).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6317   +/-   ##
=======================================
  Coverage   89.34%   89.34%           
=======================================
  Files         961      961           
  Lines       20161    20161           
=======================================
  Hits        18012    18012           
  Misses       2149     2149           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tvdeyen tvdeyen merged commit 12f00d6 into solidusio:main Aug 9, 2025
39 checks passed
@adammathys adammathys deleted the chore-stock-item-rubocop-lint branch August 11, 2025 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog:solidus_core Changes to the solidus_core gem

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants