Skip to content

Commit b82b7c9

Browse files
Fix Style/MutableConstant violations
1 parent 209c3c7 commit b82b7c9

File tree

8 files changed

+15
-29
lines changed

8 files changed

+15
-29
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -183,20 +183,6 @@ Style/MultilineBlockChain:
183183
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/add_development_certificates_to_provisioning_profiles.rb'
184184
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/add_devices_to_provisioning_profiles.rb'
185185

186-
# Offense count: 15
187-
# This cop supports unsafe autocorrection (--autocorrect-all).
188-
# Configuration parameters: EnforcedStyle.
189-
# SupportedStyles: literals, strict
190-
Style/MutableConstant:
191-
Exclude:
192-
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_codefreeze_prechecks.rb'
193-
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_lint_localizations.rb'
194-
- 'lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_version_helper.rb'
195-
- 'lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_adc_app_sizes_helper.rb'
196-
- 'lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_l10n_linter_helper.rb'
197-
- 'lib/fastlane/plugin/wpmreleasetoolkit/version.rb'
198-
- 'spec/release_notes_helper_spec.rb'
199-
200186
# Offense count: 23
201187
# This cop supports unsafe autocorrection (--autocorrect-all).
202188
# Configuration parameters: EnforcedStyle, AllowedMethods, AllowedPatterns.

lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_codefreeze_prechecks.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
module Fastlane
22
module Actions
33
class AndroidCodefreezePrechecksAction < Action
4-
VERSION_RELEASE = 'release'
5-
VERSION_ALPHA = 'alpha'
4+
VERSION_RELEASE = 'release'.freeze
5+
VERSION_ALPHA = 'alpha'.freeze
66

77
def self.run(params)
88
# fastlane will take care of reading in the parameter and fetching the environment variable:

lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_lint_localizations.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def self.find_duplicated_keys(params)
6868
duplicate_keys
6969
end
7070

71-
RETRY_MESSAGE = <<~MSG
71+
RETRY_MESSAGE = <<~MSG.freeze
7272
Inconsistencies found during Localization linting.
7373
You need to fix them before continuing. From this point on, you should either:
7474
@@ -91,7 +91,7 @@ def self.find_duplicated_keys(params)
9191
Did you fix the `.strings` files locally and want to lint them again?
9292
MSG
9393

94-
ABORT_MESSAGE = <<~MSG
94+
ABORT_MESSAGE = <<~MSG.freeze
9595
Inconsistencies found during Localization linting. Aborting.
9696
MSG
9797

lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_version_helper.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ module Android
55
#
66
module VersionHelper
77
# The key used in internal version Hash objects to hold the versionName value
8-
VERSION_NAME = 'name'
8+
VERSION_NAME = 'name'.freeze
99
# The key used in internal version Hash objects to hold the versionCode value
10-
VERSION_CODE = 'code'
10+
VERSION_CODE = 'code'.freeze
1111
# The index for the major version number part
1212
MAJOR_NUMBER = 0
1313
# The index for the minor version number part
1414
MINOR_NUMBER = 1
1515
# The index for the hotfix version number part
1616
HOTFIX_NUMBER = 2
1717
# The prefix used in front of the versionName for alpha versions
18-
ALPHA_PREFIX = 'alpha-'
18+
ALPHA_PREFIX = 'alpha-'.freeze
1919
# The suffix used in the versionName for RC (beta) versions
20-
RC_SUFFIX = '-rc'
20+
RC_SUFFIX = '-rc'.freeze
2121

2222
# Returns the public-facing version string.
2323
#

lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_adc_app_sizes_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module Fastlane
44
module Helper
55
module Ios
66
module ADCAppSizesHelper
7-
DEFAULT_DEVICES = ['Universal', 'iPhone 8', 'iPhone X']
7+
DEFAULT_DEVICES = ['Universal', 'iPhone 8', 'iPhone X'].freeze
88

99
# Fetch the App Sizes stats from ADC
1010
#

lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_l10n_linter_helper.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ module Fastlane
55
module Helper
66
module Ios
77
class L10nLinterHelper
8-
SWIFTGEN_VERSION = '6.4.0'
9-
DEFAULT_BASE_LANG = 'en'
10-
CONFIG_FILE_NAME = 'swiftgen-stringtypes.yml'
8+
SWIFTGEN_VERSION = '6.4.0'.freeze
9+
DEFAULT_BASE_LANG = 'en'.freeze
10+
CONFIG_FILE_NAME = 'swiftgen-stringtypes.yml'.freeze
1111

1212
attr_reader :install_path, :version
1313

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module Fastlane
22
module Wpmreleasetoolkit
3-
VERSION = '8.1.0'
3+
VERSION = '8.1.0'.freeze
44
end
55
end

spec/release_notes_helper_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
end
6060
end
6161

62-
FAKE_CONTENT = <<~CONTENT
62+
FAKE_CONTENT = <<~CONTENT.freeze
6363
1.2.3
6464
-----
6565
- Item 1 for v1.2.3
@@ -73,7 +73,7 @@
7373
- Item 2 for v1.2.2
7474
CONTENT
7575

76-
NEW_SECTION = <<~CONTENT
76+
NEW_SECTION = <<~CONTENT.freeze
7777
New Section
7878
-----
7979

0 commit comments

Comments
 (0)