Skip to content

Commit fcf8e1a

Browse files
authored
Remove activesupport as a runtime dependency and clean up RuboCop config (#709)
2 parents dee0caf + 2bc392c commit fcf8e1a

14 files changed

Lines changed: 162 additions & 205 deletions

.rubocop.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,18 @@ Style/FetchEnvVar:
5454
Style/HashSyntax:
5555
EnforcedShorthandSyntax: never
5656

57+
########## Naming Rules
58+
59+
# 76 methods in this gem use `is_`/`has_`/`have_` prefixes. These are part of the public API
60+
# and renaming them would be a breaking change for consumers.
61+
Naming/PredicatePrefix:
62+
Enabled: false
63+
64+
# Many flagged methods are part of Fastlane's Action API contract (e.g. `self.run`)
65+
# or are public API methods that cannot be renamed without breaking consumers.
66+
Naming/PredicateMethod:
67+
Enabled: false
68+
5769
########## Gemspec Rules
5870

5971
# This was turned on by default after updating Rubocop to `1.50.2`. We want to disable this for now because
@@ -62,6 +74,23 @@ Style/HashSyntax:
6274
Gemspec/RequireMFA:
6375
Enabled: false
6476

77+
# Dev dependencies are defined in the gemspec, which is the standard pattern for this project.
78+
Gemspec/DevelopmentDependencies:
79+
Exclude:
80+
- 'fastlane-plugin-wpmreleasetoolkit.gemspec'
81+
82+
########## Style Rules
83+
84+
# No class-level documentation is required — this is a Fastlane plugin, not a library with public docs.
85+
Style/Documentation:
86+
Enabled: false
87+
88+
# These files intentionally reopen external modules (Nokogiri, Fastlane).
89+
Style/OneClassPerFile:
90+
Exclude:
91+
- 'lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_localize_helper.rb'
92+
- 'lib/fastlane/plugin/wpmreleasetoolkit/helper/ci_helper.rb'
93+
6594
########## Metrics / Max Lengths Rules
6695

6796
Layout/LineLength:
@@ -107,3 +136,15 @@ RSpec/MultipleMemoizedHelpers:
107136

108137
RSpec/MultipleExpectations:
109138
Enabled: false
139+
140+
# The project consistently uses `receive` style across 136 usages — this is the preferred style.
141+
RSpec/MessageSpies:
142+
EnforcedStyle: receive
143+
144+
# Spec structure uses up to 5 levels of nesting, which is acceptable for this project.
145+
RSpec/NestedGroups:
146+
Max: 5
147+
148+
# Spec file paths don't follow the default RuboCop convention due to the plugin's namespace structure.
149+
RSpec/SpecFilePathFormat:
150+
Enabled: false

.rubocop_todo.yml

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,6 @@
66
# Note that changes in the inspected code, or installation of new
77
# versions of RuboCop, may require this file to be generated again.
88

9-
# Offense count: 10
10-
# Configuration parameters: EnforcedStyle, AllowedGems, Include.
11-
# SupportedStyles: Gemfile, gems.rb, gemspec
12-
# Include: **/*.gemspec, **/Gemfile, **/gems.rb
13-
Gemspec/DevelopmentDependencies:
14-
Exclude:
15-
- 'fastlane-plugin-wpmreleasetoolkit.gemspec'
16-
179
# Offense count: 3
1810
Lint/NonLocalExitFromIterator:
1911
Exclude:
@@ -33,15 +25,6 @@ Naming/MethodParameterName:
3325
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_update_metadata_source_action.rb'
3426
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/common/gp_update_metadata_source.rb'
3527

36-
# Offense count: 76
37-
# Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros.
38-
# NamePrefix: is_, has_, have_
39-
# ForbiddenPrefixes: is_, has_, have_
40-
# AllowedMethods: is_a?
41-
# MethodDefinitionMacros: define_method, define_singleton_method
42-
Naming/PredicateName:
43-
Enabled: false
44-
4528
# Offense count: 2
4629
# Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
4730
# SupportedStyles: snake_case, normalcase, non_integer
@@ -87,12 +70,6 @@ RSpec/InstanceVariable:
8770
- 'spec/git_helper_spec.rb'
8871
- 'spec/ios_lint_localizations_spec.rb'
8972

90-
# Offense count: 136
91-
# Configuration parameters: .
92-
# SupportedStyles: have_received, receive
93-
RSpec/MessageSpies:
94-
EnforcedStyle: receive
95-
9673
# Offense count: 46
9774
# Configuration parameters: EnforcedStyle, IgnoreSharedExamples.
9875
# SupportedStyles: always, named_only
@@ -103,11 +80,6 @@ RSpec/NamedSubject:
10380
- 'spec/configuration_spec.rb'
10481
- 'spec/file_reference_spec.rb'
10582

106-
# Offense count: 20
107-
# Configuration parameters: AllowedGroups.
108-
RSpec/NestedGroups:
109-
Max: 5
110-
11183
# Offense count: 54
11284
# Configuration parameters: AllowedPatterns.
11385
# AllowedPatterns: ^expect_, ^assert_
@@ -131,12 +103,6 @@ RSpec/ReceiveMessages:
131103
- 'spec/file_reference_spec.rb'
132104
- 'spec/firebase_device_spec.rb'
133105

134-
# Offense count: 63
135-
# Configuration parameters: Include, CustomTransform, IgnoreMethods, IgnoreMetadata.
136-
# Include: **/*_spec.rb
137-
RSpec/SpecFilePathFormat:
138-
Enabled: false
139-
140106
# Offense count: 7
141107
RSpec/StubbedMock:
142108
Exclude:
@@ -181,11 +147,6 @@ Security/Open:
181147
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_validate_lib_strings_action.rb'
182148
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_create_xml_release_notes.rb'
183149

184-
# Offense count: 95
185-
# Configuration parameters: AllowedConstants.
186-
Style/Documentation:
187-
Enabled: false
188-
189150
# Offense count: 1
190151
# This cop supports safe autocorrection (--autocorrect).
191152
Style/EmptyLiteral:

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ _None_
1818

1919
### Internal Changes
2020

21-
_None_
21+
- Remove `activesupport` as a runtime dependency — replace the only production usage (`deep_dup`) with `Marshal` deep copy — and move it to a dev-only dependency for specs. [#709]
22+
- Update RuboCop configuration: fix obsolete `Naming/PredicateName` cop rename, move permanent style choices from `.rubocop_todo.yml` to `.rubocop.yml`, and fix a `Style/FileOpen` violation. [#709]
2223

2324
## 14.3.0
2425

0 commit comments

Comments
 (0)