From 596fe0617281857fee043a06c555a3da34b99bf0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 7 Aug 2026 18:06:44 +0000 Subject: [PATCH 1/7] Bump the rubocop group across 1 directory with 2 updates Bumps the rubocop group with 1 update in the / directory: [rubocop-minitest](https://github.com/rubocop/rubocop-minitest). Updates `rubocop-minitest` from 0.39.1 to 0.40.0 - [Release notes](https://github.com/rubocop/rubocop-minitest/releases) - [Changelog](https://github.com/rubocop/rubocop-minitest/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop-minitest/compare/v0.39.1...v0.40.0) Updates `rubocop` from 1.88.2 to 1.89.0 - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.88.2...v1.89.0) --- updated-dependencies: - dependency-name: rubocop dependency-version: 1.89.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: rubocop - dependency-name: rubocop-minitest dependency-version: 0.40.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: rubocop ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 58134b9e..c2bd1c84 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -63,7 +63,7 @@ GEM jekyll (>= 3.8, < 5.0) jekyll-watch (2.2.1) listen (~> 3.0) - json (2.21.1) + json (2.21.2) kramdown (2.5.2) rexml (>= 3.4.4) kramdown-parser-gfm (1.1.0) @@ -81,7 +81,7 @@ GEM drb (~> 2.0) prism (~> 1.5) parallel (2.1.0) - parser (3.3.11.1) + parser (3.3.12.0) ast (~> 2.4.1) racc pathutil (0.16.2) @@ -97,7 +97,7 @@ GEM regexp_parser (2.12.0) rexml (3.4.4) rouge (4.7.0) - rubocop (1.88.2) + rubocop (1.89.0) json (~> 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) @@ -111,7 +111,7 @@ GEM rubocop-ast (1.50.0) parser (>= 3.3.7.2) prism (~> 1.7) - rubocop-minitest (0.39.1) + rubocop-minitest (0.40.0) lint_roller (~> 1.1) rubocop (>= 1.75.0, < 2.0) rubocop-ast (>= 1.38.0, < 2.0) From 7ca7ee6cf1a6058b9fde0ec07fe458725e09e89b Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 7 Aug 2026 18:07:07 +0000 Subject: [PATCH 2/7] Dump full RuboCop config This automated commit dumps the contents of the full RuboCop config. [dependabot skip] --- test/fixtures/full_config.yml | 51 +++++++++++++++++++++++++++++------ 1 file changed, 43 insertions(+), 8 deletions(-) diff --git a/test/fixtures/full_config.yml b/test/fixtures/full_config.yml index f1eb27ee..8d55312b 100644 --- a/test/fixtures/full_config.yml +++ b/test/fixtures/full_config.yml @@ -68,6 +68,7 @@ AllCops: DisabledByDefault: false NewCops: disable UseProjectIndex: false + ProjectIndexIncludesGems: false UseCache: true MaxFilesInCache: 20000 CacheRootDirectory: @@ -95,6 +96,9 @@ AllCops: - factory_bot_rails rubocop-rspec_rails: - rspec-rails + rubocop-i18n: + - i18n + - gettext ActiveSupportExtensionsEnabled: false StringLiteralsFrozenByDefault: Bundler/DuplicatedGem: @@ -352,7 +356,7 @@ Layout/ClassStructure: Enabled: false SafeAutoCorrect: false VersionAdded: '0.52' - VersionChanged: '1.53' + VersionChanged: '1.89' Categories: module_inclusion: - include @@ -365,6 +369,7 @@ Layout/ClassStructure: - initializer - public_methods - protected_methods + - private_class_methods - private_methods Layout/ClosingHeredocIndentation: Description: Checks the indentation of here document closings. @@ -711,6 +716,7 @@ Layout/LeadingCommentSpace: AllowGemfileRubyComment: false AllowRBSInlineAnnotation: true AllowSteepAnnotation: false + AllowYARDCommentBlockSeparator: false Layout/LeadingEmptyLines: Description: Checks for unnecessary blank lines at the beginning of a file. Enabled: true @@ -1117,7 +1123,7 @@ Lint/AmbiguousBlockAssociation: without parentheses. Enabled: false VersionAdded: '0.48' - VersionChanged: '1.13' + VersionChanged: '1.89' AllowedMethods: [] AllowedPatterns: [] Lint/AmbiguousOperator: @@ -1198,6 +1204,7 @@ Lint/ConstantReassignment: VersionChanged: '1.87' Lint/ConstantResolution: Description: Checks that constants are fully qualified with `::`. + VersionChanged: '1.89' Enabled: false VersionAdded: '0.86' Only: [] @@ -1293,6 +1300,11 @@ Lint/DeprecatedOpenSSLConstant: Description: Don't use algorithm constants for `OpenSSL::Cipher` and `OpenSSL::Digest`. Enabled: true VersionAdded: '0.84' +Lint/DeprecatedReference: + Description: Checks for references to methods and constants documented as deprecated + with a YARD `@deprecated` tag. Requires `AllCops/UseProjectIndex` to be enabled. + Enabled: pending + VersionAdded: '1.89' Lint/DisjunctiveAssignmentInConstructor: Description: In constructor, plain assignment is preferred over disjunctive. Enabled: true @@ -1333,6 +1345,9 @@ Lint/DuplicateMethods: Description: Checks for duplicate method definitions. Enabled: true VersionAdded: '0.29' + VersionChanged: '1.89' + DelegatingMethods: + - delegate Lint/DuplicateRegexpCharacterClassElement: Description: Checks for duplicate elements in Regexp character classes. Enabled: true @@ -1485,7 +1500,7 @@ Lint/InheritException: Enabled: false SafeAutoCorrect: false VersionAdded: '0.41' - VersionChanged: '1.26' + VersionChanged: '1.89' EnforcedStyle: standard_error SupportedStyles: - standard_error @@ -1539,7 +1554,7 @@ Lint/MissingSuper: calls to `super`. Enabled: false VersionAdded: '0.89' - VersionChanged: '1.4' + VersionChanged: '1.89' AllowedParentClasses: [] Lint/MixedCaseRange: Description: Checks for mixed-case character ranges since they include likely unintended @@ -1556,6 +1571,14 @@ Lint/MultipleComparison: Enabled: true VersionAdded: '0.47' VersionChanged: '1.1' +Lint/NameTypo: + Description: Checks for probable typos in constant and method names, using the project + index. + Enabled: pending + CheckConstants: true + CheckMethods: true + AllowedNames: [] + VersionAdded: '1.89' Lint/NestedMethodDefinition: Description: Do not use nested method definitions. StyleGuide: "#no-nested-methods" @@ -1772,8 +1795,9 @@ Lint/ReturnInVoidContext: Lint/SafeNavigationChain: Description: Do not chain ordinary method call after safe navigation operator. Enabled: true + SafeAutoCorrect: false VersionAdded: '0.47' - VersionChanged: '0.77' + VersionChanged: '1.89' AllowedMethods: - present? - blank? @@ -1963,6 +1987,11 @@ Lint/UnusedMethodArgument: IgnoreNotImplementedMethods: true NotImplementedExceptions: - NotImplementedError +Lint/UnusedPrivateMethod: + Description: Checks for private instance methods that are not referenced anywhere + in the project. Requires `AllCops/UseProjectIndex` to be enabled. + Enabled: false + VersionAdded: '1.89' Lint/UriEscapeUnescape: Description: "`URI.escape` method is obsolete and should not be used. Instead, use `CGI.escape`, `URI.encode_www_form` or `URI.encode_www_form_component` depending @@ -2160,6 +2189,7 @@ Migration/DepartmentName: Naming/AccessorMethodName: Description: Checks the naming of accessor methods for get_/set_. StyleGuide: "#accessor_mutator_method_names" + VersionChanged: '1.89' Enabled: false VersionAdded: '0.50' Naming/AsciiIdentifiers: @@ -2384,7 +2414,7 @@ Naming/PredicatePrefix: StyleGuide: "#bool-methods-qmark" Enabled: false VersionAdded: '0.50' - VersionChanged: '1.75' + VersionChanged: '1.89' NamePrefix: - is_ ForbiddenPrefixes: @@ -2703,7 +2733,7 @@ Style/ClassAndModuleChildren: SafeAutoCorrect: false Enabled: false VersionAdded: '0.19' - VersionChanged: '1.74' + VersionChanged: '1.89' EnforcedStyle: nested SupportedStyles: - nested @@ -2929,8 +2959,9 @@ Style/DisableCopsWithinSourceCodeDirective: Description: Forbids disabling/enabling cops within source code. Enabled: false VersionAdded: '0.82' - VersionChanged: '1.9' + VersionChanged: '1.89' AllowedCops: [] + DisallowedCops: [] Style/DocumentDynamicEvalDefinition: Description: When using `class_eval` (or other `eval`) with string interpolation, add a comment block showing its appearance if interpolated. @@ -2942,6 +2973,7 @@ Style/Documentation: Description: Document classes and non-namespace modules. Enabled: false VersionAdded: '0.9' + VersionChanged: '1.89' AllowedConstants: [] Exclude: - "/spec/**/*" @@ -3622,6 +3654,7 @@ Style/MissingRespondToMissing: StyleGuide: "#no-method-missing" Enabled: false VersionAdded: '0.56' + VersionChanged: '1.89' Style/MixinGrouping: Description: Checks for grouping of mixins in `class` and `module` bodies. StyleGuide: "#mixin-grouping" @@ -4112,6 +4145,7 @@ Style/RedundantConditional: VersionAdded: '0.50' Style/RedundantConstantBase: Description: Avoid redundant `::` prefix on constant. + VersionChanged: '1.89' Enabled: false VersionAdded: '1.40' Style/RedundantCurrentDirectoryInPath: @@ -4473,6 +4507,7 @@ Style/StabbyLambdaParentheses: Style/StaticClass: Description: Prefer modules to classes with only class methods. StyleGuide: "#modules-vs-classes" + VersionChanged: '1.89' Enabled: false Safe: false VersionAdded: '1.3' From c0b92f23ed1801cc2749d908d6492419e38c0e06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Fri, 7 Aug 2026 14:23:26 -0400 Subject: [PATCH 3/7] Reset the default configuration and loaded plugins Plugins loaded as side effects of running tests (e.g. rubocop-minitest's integrate_plugins!) can leak into the dump. --- lib/tasks/config.rake | 10 ++++++++++ test/rubocop/cop/lint/no_return_in_memoization_test.rb | 6 ++---- test/rubocop/cop/style/proc_case_when_test.rb | 6 ++---- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/lib/tasks/config.rake b/lib/tasks/config.rake index ace7badd..f294f45b 100644 --- a/lib/tasks/config.rake +++ b/lib/tasks/config.rake @@ -8,6 +8,16 @@ namespace :config do file = "rubocop.yml" target = args.fetch(:target, "test/fixtures/full_config.yml") + # Reset the default configuration and loaded plugins so that plugins loaded + # as side effects of running tests (e.g. rubocop-minitest's + # AssertOffense#integrate_plugins!) do not leak into the dump. Without this, + # integrate_plugins! injects all installed lint_roller plugins into the + # global default_configuration, and a prior load_file("rubocop.yml") marks + # rubocop-shopify as already loaded so resolve_plugins skips re-injecting it + # after the reset. Both are lazily rebuilt on the next access. + RuboCop::ConfigLoader.instance_variable_set(:@default_configuration, nil) + RuboCop::ConfigLoader.loaded_plugins.clear + file_config = RuboCop::ConfigLoader.load_file(file) config = RuboCop::ConfigLoader.merge_with_default(file_config, file) output = config.to_h.to_yaml.gsub(config.base_dir_for_path_parameters, "") diff --git a/test/rubocop/cop/lint/no_return_in_memoization_test.rb b/test/rubocop/cop/lint/no_return_in_memoization_test.rb index 5b87b434..e04135fe 100644 --- a/test/rubocop/cop/lint/no_return_in_memoization_test.rb +++ b/test/rubocop/cop/lint/no_return_in_memoization_test.rb @@ -1,14 +1,12 @@ # frozen_string_literal: true require "test_helper" -require "rubocop/minitest/assert_offense" +require "rubocop/test_case" module RuboCop module Cop module Lint - class NoReturnInMemoizationTest < ::Minitest::Test - include ::RuboCop::Minitest::AssertOffense - + class NoReturnInMemoizationTest < TestCase def setup @cop = NoReturnInMemoization.new end diff --git a/test/rubocop/cop/style/proc_case_when_test.rb b/test/rubocop/cop/style/proc_case_when_test.rb index 9c1cb767..39ce497e 100644 --- a/test/rubocop/cop/style/proc_case_when_test.rb +++ b/test/rubocop/cop/style/proc_case_when_test.rb @@ -1,14 +1,12 @@ # frozen_string_literal: true require "test_helper" -require "rubocop/minitest/assert_offense" +require "rubocop/test_case" module RuboCop module Cop module Style - class ProcCaseWhenTest < ::Minitest::Test - include ::RuboCop::Minitest::AssertOffense - + class ProcCaseWhenTest < TestCase MESSAGE = "Avoid a `case`/`when` where every `when` is a proc or value " \ "literal: each proc literal allocates a new `Proc` every time the " \ "`case` is evaluated and adds `Proc#call` overhead, and the whole " \ From cea56073fa9c3390cd1f220b6098d92814b4a701 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Fri, 7 Aug 2026 14:30:45 -0400 Subject: [PATCH 4/7] Disable `Lint/DeprecatedReference` and `Lint/NameTypo` for RuboCop 1.89+. --- rubocop.yml | 10 ++++++++++ test/fixtures/full_config.yml | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/rubocop.yml b/rubocop.yml index 9106c728..eeec492c 100644 --- a/rubocop.yml +++ b/rubocop.yml @@ -218,6 +218,11 @@ Lint/DataDefineOverride: Lint/DeprecatedConstants: Enabled: false +<% if rubocop_version >= "1.89" %> +Lint/DeprecatedReference: + Enabled: false +<% end %> + Lint/DuplicateBranch: Enabled: false @@ -302,6 +307,11 @@ Lint/MixedCaseRange: Lint/MixedRegexpCaptureTypes: Enabled: false +<% if rubocop_version >= "1.89" %> +Lint/NameTypo: + Enabled: false +<% end %> + Lint/NoReturnInBeginEndBlocks: Enabled: false diff --git a/test/fixtures/full_config.yml b/test/fixtures/full_config.yml index 8d55312b..f8f042b1 100644 --- a/test/fixtures/full_config.yml +++ b/test/fixtures/full_config.yml @@ -1303,7 +1303,7 @@ Lint/DeprecatedOpenSSLConstant: Lint/DeprecatedReference: Description: Checks for references to methods and constants documented as deprecated with a YARD `@deprecated` tag. Requires `AllCops/UseProjectIndex` to be enabled. - Enabled: pending + Enabled: false VersionAdded: '1.89' Lint/DisjunctiveAssignmentInConstructor: Description: In constructor, plain assignment is preferred over disjunctive. @@ -1574,7 +1574,7 @@ Lint/MultipleComparison: Lint/NameTypo: Description: Checks for probable typos in constant and method names, using the project index. - Enabled: pending + Enabled: false CheckConstants: true CheckMethods: true AllowedNames: [] From 113913c8b738eb5890f0c1e9efffc434e5ddf94f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Fri, 7 Aug 2026 14:37:53 -0400 Subject: [PATCH 5/7] Require rubocop 1.89 --- Gemfile.lock | 2 +- dev.yml | 2 +- rubocop-shopify.gemspec | 2 +- rubocop.yml | 66 ----------------------------------------- 4 files changed, 3 insertions(+), 69 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index c2bd1c84..7eef2b3f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,7 +3,7 @@ PATH specs: rubocop-shopify (3.0.2) lint_roller - rubocop (~> 1.72, >= 1.72.1) + rubocop (~> 1.89) GEM remote: https://rubygems.org/ diff --git a/dev.yml b/dev.yml index 96327e43..ee30f733 100644 --- a/dev.yml +++ b/dev.yml @@ -8,5 +8,5 @@ test: bundle exec rake commands: dump-config: - description: Dump the full RuboCop config as a YAML file for testing + desc: Dump the full RuboCop config as a YAML file for testing run: bundle exec rake config:dump diff --git a/rubocop-shopify.gemspec b/rubocop-shopify.gemspec index 4586b145..5da37f56 100644 --- a/rubocop-shopify.gemspec +++ b/rubocop-shopify.gemspec @@ -29,6 +29,6 @@ Gem::Specification.new do |s| s.required_ruby_version = ">= 3.3.0" - s.add_dependency("rubocop", "~> 1.72", ">= 1.72.1") + s.add_dependency("rubocop", "~> 1.89") s.add_dependency("lint_roller") end diff --git a/rubocop.yml b/rubocop.yml index eeec492c..9ca75e0c 100644 --- a/rubocop.yml +++ b/rubocop.yml @@ -23,10 +23,8 @@ Bundler/OrderedGems: Gemspec/AddRuntimeDependency: Enabled: false -<% if rubocop_version >= '1.77' %> Gemspec/AttributeAssignment: Enabled: true -<% end %> Gemspec/DeprecatedAttributeAssignment: Enabled: true @@ -79,10 +77,8 @@ Layout/EmptyLineAfterGuardClause: Layout/EmptyLines: Enabled: false -<% if rubocop_version >= '1.79' %> Layout/EmptyLinesAfterModuleInclusion: Enabled: false -<% end %> Layout/EndAlignment: Enabled: false @@ -210,18 +206,14 @@ Lint/ConstantReassignment: Lint/CopDirectiveSyntax: Enabled: true -<% if rubocop_version >= "1.85" %> Lint/DataDefineOverride: Enabled: true -<% end %> Lint/DeprecatedConstants: Enabled: false -<% if rubocop_version >= "1.89" %> Lint/DeprecatedReference: Enabled: false -<% end %> Lint/DuplicateBranch: Enabled: false @@ -307,10 +299,8 @@ Lint/MixedCaseRange: Lint/MixedRegexpCaptureTypes: Enabled: false -<% if rubocop_version >= "1.89" %> Lint/NameTypo: Enabled: false -<% end %> Lint/NoReturnInBeginEndBlocks: Enabled: false @@ -402,10 +392,8 @@ Lint/ShadowedArgument: Lint/ShadowedException: Enabled: false -<% if rubocop_version < "1.76" %> Lint/ShadowingOuterLocalVariable: Enabled: false -<% end %> Lint/SharedMutableDefault: Enabled: false @@ -455,10 +443,8 @@ Lint/UnreachableCode: Lint/UnreachableLoop: Enabled: false -<% if rubocop_version >= "1.85" %> Lint/UnreachablePatternBranch: Enabled: true -<% end %> Lint/UnusedBlockArgument: Enabled: false @@ -481,10 +467,8 @@ Lint/UselessAssignment: Lint/UselessConstantScoping: Enabled: false -<% if rubocop_version >= "1.76" %> Lint/UselessDefaultValueArgument: Enabled: true -<% end %> Lint/UselessDefined: Enabled: false @@ -498,10 +482,8 @@ Lint/UselessMethodDefinition: Lint/UselessNumericOperation: Enabled: false -<% if rubocop_version >= "1.76" %> Lint/UselessOr: Enabled: true -<% end %> Lint/UselessRescue: Enabled: false @@ -573,16 +555,10 @@ Naming/MemoizedInstanceVariableName: Naming/MethodParameterName: MinNameLength: 1 -<% if rubocop_version >= "1.76" %> Naming/PredicateMethod: Enabled: false -<% end %> -<% if rubocop_version >= "1.76" %> Naming/PredicatePrefix: -<% else %> -Naming/PredicateName: -<% end %> Enabled: false NamePrefix: - is_ @@ -642,10 +618,8 @@ Style/ArrayCoercion: Style/ArrayIntersect: Enabled: false -<% if rubocop_version >= '1.81' %> Style/ArrayIntersectWithSingleElement: Enabled: false -<% end %> Style/ArrayJoin: Enabled: false @@ -689,10 +663,8 @@ Style/ClassMethodsDefinitions: Style/CollectionCompact: Enabled: false -<% if rubocop_version >= '1.77' %> Style/CollectionQuerying: Enabled: false -<% end %> Style/CombinableDefined: Enabled: true @@ -710,10 +682,8 @@ Style/CommentAnnotation: Style/CommentedKeyword: Enabled: false -<% if rubocop_version >= "1.74" %> Style/ComparableBetween: Enabled: false -<% end %> Style/ComparableClamp: Enabled: false @@ -760,10 +730,8 @@ Style/EmptyBlockParameter: Style/EmptyCaseCondition: Enabled: false -<% if rubocop_version >= "1.84" %> Style/EmptyClassDefinition: Enabled: false -<% end %> Style/EmptyElse: Enabled: false @@ -781,10 +749,8 @@ Style/EmptyLiteral: Style/EmptyMethod: Enabled: false -<% if rubocop_version >= "1.76" %> Style/EmptyStringInsideInterpolation: Enabled: false -<% end %> Style/Encoding: Enabled: false @@ -825,10 +791,8 @@ Style/FileEmpty: Style/FileNull: Enabled: false -<% if rubocop_version >= "1.85" %> Style/FileOpen: Enabled: false -<% end %> Style/FileRead: Enabled: false @@ -876,10 +840,8 @@ Style/HashEachMethods: Style/HashExcept: Enabled: false -<% if rubocop_version >= "1.75" %> Style/HashFetchChain: Enabled: false -<% end %> Style/HashLikeCase: Enabled: false @@ -923,10 +885,8 @@ Style/InverseMethods: Style/ItAssignment: Enabled: false -<% if rubocop_version >= "1.75" %> Style/ItBlockParameter: Enabled: false -<% end %> Style/KeywordArgumentsMerging: Enabled: false @@ -953,10 +913,8 @@ Style/MapCompactWithConditionalBlock: Style/MapIntoArray: Enabled: false -<% if rubocop_version >= "1.85" %> Style/MapJoin: Enabled: true -<% end %> Style/MapToHash: Enabled: false @@ -997,10 +955,8 @@ Style/ModuleFunction: Enabled: false EnforcedStyle: extend_self -<% if rubocop_version >= "1.82" %> Style/ModuleMemberExistenceCheck: Enabled: true -<% end %> Style/MultilineBlockChain: Enabled: false @@ -1038,10 +994,8 @@ Style/NegatedUnless: Style/NegatedWhile: Enabled: false -<% if rubocop_version >= "1.84" %> Style/NegativeArrayIndex: Enabled: true -<% end %> Style/NestedFileDirname: Enabled: false @@ -1088,10 +1042,8 @@ Style/NumericPredicate: Style/ObjectThen: Enabled: false -<% if rubocop_version >= "1.85" %> Style/OneClassPerFile: Enabled: false -<% end %> Style/OneLineConditional: Enabled: false @@ -1117,10 +1069,8 @@ Style/ParallelAssignment: Style/ParenthesesAroundCondition: Enabled: false -<% if rubocop_version >= "1.85" %> Style/PartitionInsteadOfDoubleSelect: Enabled: false -<% end %> Style/PercentLiteralDelimiters: Enabled: false @@ -1131,10 +1081,8 @@ Style/PercentQLiterals: Style/PerlBackrefs: Enabled: false -<% if rubocop_version >= "1.85" %> Style/PredicateWithKind: Enabled: false -<% end %> Style/PreferredHashMethods: Enabled: false @@ -1151,10 +1099,8 @@ Style/RaiseArgs: Style/RandomWithOffset: Enabled: false -<% if rubocop_version >= "1.85" %> Style/ReduceToHash: Enabled: true -<% end %> Style/RedundantArgument: Enabled: false @@ -1162,10 +1108,8 @@ Style/RedundantArgument: Style/RedundantArrayConstructor: Enabled: false -<% if rubocop_version >= "1.76" %> Style/RedundantArrayFlatten: Enabled: true -<% end %> Style/RedundantAssignment: Enabled: false @@ -1221,10 +1165,8 @@ Style/RedundantInterpolationUnfreeze: Style/RedundantLineContinuation: Enabled: false -<% if rubocop_version >= "1.85" %> Style/RedundantMinMaxBy: Enabled: true -<% end %> Style/RedundantParentheses: Enabled: false @@ -1275,10 +1217,8 @@ Style/RescueStandardError: Style/ReturnNilInPredicateMethodDefinition: Enabled: false -<% if rubocop_version >= "1.84" %> Style/ReverseFind: Enabled: false -<% end %> Style/SafeNavigation: Enabled: false @@ -1289,15 +1229,11 @@ Style/SafeNavigationChainLength: Style/Sample: Enabled: false -<% if rubocop_version >= "1.85" %> Style/SelectByKind: Enabled: true -<% end %> -<% if rubocop_version >= "1.85" %> Style/SelectByRange: Enabled: true -<% end %> Style/SelectByRegexp: Enabled: false @@ -1369,10 +1305,8 @@ Style/SymbolArray: Style/SymbolProc: Enabled: false -<% if rubocop_version >= "1.85" %> Style/TallyMethod: Enabled: true -<% end %> Style/TernaryParentheses: Enabled: false From 59ea6522bc2a3c1b9d06e77da821970292409da5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Fri, 7 Aug 2026 14:41:43 -0400 Subject: [PATCH 6/7] Lazy load cops --- lib/rubocop-shopify.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/rubocop-shopify.rb b/lib/rubocop-shopify.rb index 4ebc1e1a..b486ff73 100644 --- a/lib/rubocop-shopify.rb +++ b/lib/rubocop-shopify.rb @@ -1,7 +1,8 @@ # frozen_string_literal: true +require "rubocop" require "rubocop/shopify/version" require "rubocop/shopify/plugin" -require "rubocop/cop/lint/no_return_in_memoization" -require "rubocop/cop/style/proc_case_when" +RuboCop::Cop::Lint.register_cop :NoReturnInMemoization, "#{__dir__}/rubocop/cop/lint/no_return_in_memoization" +RuboCop::Cop::Style.register_cop :ProcCaseWhen, "#{__dir__}/rubocop/cop/style/proc_case_when" From 2e23d3871874a89d061c744489bad0df75d8812a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Fri, 7 Aug 2026 14:44:43 -0400 Subject: [PATCH 7/7] Remove unnecessary config --- rubocop.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/rubocop.yml b/rubocop.yml index 9ca75e0c..6cbb9a70 100644 --- a/rubocop.yml +++ b/rubocop.yml @@ -392,9 +392,6 @@ Lint/ShadowedArgument: Lint/ShadowedException: Enabled: false -Lint/ShadowingOuterLocalVariable: - Enabled: false - Lint/SharedMutableDefault: Enabled: false