Skip to content

Commit 2be68dc

Browse files
committed
Fix RuboCop offenses after rebase; update rubocop_todo
1 parent 0c437bd commit 2be68dc

File tree

64 files changed

+242
-250
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+242
-250
lines changed

.rubocop_todo.yml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2023-09-21 15:44:18 UTC using RuboCop version 1.56.3.
3+
# on 2023-11-08 13:49:19 UTC using RuboCop version 1.57.1.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new
@@ -14,24 +14,16 @@ Gemspec/DevelopmentDependencies:
1414
Exclude:
1515
- 'fastlane-plugin-wpmreleasetoolkit.gemspec'
1616

17-
# Offense count: 1
18-
# Configuration parameters: Severity, Include.
19-
# Include: **/*.gemspec
20-
Gemspec/RequiredRubyVersion:
21-
Exclude:
22-
- 'fastlane-plugin-wpmreleasetoolkit.gemspec'
23-
2417
# Offense count: 3
2518
Lint/NonLocalExitFromIterator:
2619
Exclude:
2720
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/common/extract_release_notes_for_version_action.rb'
2821
- 'lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_localize_helper.rb'
2922

30-
# Offense count: 7
23+
# Offense count: 4
3124
Naming/AccessorMethodName:
3225
Exclude:
3326
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_update_action.rb'
34-
- 'lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_version_helper.rb'
3527
- 'lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_version_helper.rb'
3628

3729
# Offense count: 2
@@ -42,7 +34,7 @@ Naming/MethodParameterName:
4234
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_update_metadata_source_action.rb'
4335
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/common/gp_update_metadata_source.rb'
4436

45-
# Offense count: 108
37+
# Offense count: 109
4638
# Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros.
4739
# NamePrefix: is_, has_, have_
4840
# ForbiddenPrefixes: is_, has_, have_
@@ -68,7 +60,7 @@ RSpec/ContextWording:
6860
- 'spec/git_helper_spec.rb'
6961
- 'spec/ios_lint_localizations_spec.rb'
7062

71-
# Offense count: 45
63+
# Offense count: 61
7264
# Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly.
7365
# Include: **/*_spec*rb*, **/spec/**/*
7466
RSpec/FilePath:
@@ -96,7 +88,7 @@ RSpec/NamedSubject:
9688
- 'spec/configuration_spec.rb'
9789
- 'spec/file_reference_spec.rb'
9890

99-
# Offense count: 10
91+
# Offense count: 14
10092
RSpec/NestedGroups:
10193
Max: 5
10294

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ task :new_release do
5656
Console.header 'Update `VERSION` constant in `version.rb`...'
5757
update_version_constant(VERSION_FILE, new_version)
5858
Console.header 'Updating CHANGELOG...'
59-
parser.update_for_new_release(new_version:)
59+
parser.update_for_new_release(new_version: new_version)
6060

6161
# Commit and push
6262
Console.header 'Commit and push changes...'

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def self.run(params)
4242

4343
# Check user overwrite
4444
unless params[:base_version].nil?
45-
overwrite_version = get_user_build_version(version: params[:base_version], message:)
45+
overwrite_version = get_user_build_version(version: params[:base_version], message: message)
4646
release_version = overwrite_version[0]
4747
alpha_release_version = overwrite_version[1]
4848
end

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ def self.run(params)
1616
helper.create_avd(
1717
api: api_level,
1818
device: device_model,
19-
system_image:,
19+
system_image: system_image,
2020
name: avd_name,
21-
sdcard:
21+
sdcard: sdcard
2222
)
2323
end
2424

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ def self.run(params)
1111
res_dir = File.join(project_root_folder || '.', params[:res_dir])
1212

1313
Fastlane::Helper::Android::LocalizeHelper.create_available_languages_file(
14-
res_dir:,
14+
res_dir: res_dir,
1515
locale_codes: [params[:source_locale]] + params[:locales].map { |h| h[:android] }
1616
)
1717
Fastlane::Helper::Android::LocalizeHelper.download_from_glotpress(
18-
res_dir:,
18+
res_dir: res_dir,
1919
glotpress_project_url: params[:glotpress_url],
2020
glotpress_filters: params[:status_filter].map { |s| { status: s } },
2121
locales_map: params[:locales]

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ def self.run(params)
3333
project_id: params[:project_id],
3434
apk_path: params[:apk_path],
3535
test_apk_path: params[:test_apk_path],
36-
device:,
36+
device: device,
3737
test_targets: params[:test_targets],
3838
type: params[:type]
3939
)
4040

4141
# Download all of the outputs from the job to the local machine
4242
FirebaseTestRunner.download_result_files(
43-
result:,
43+
result: result,
4444
destination: test_dir,
4545
project_id: params[:project_id],
4646
key_file_path: params[:key_file]

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,18 @@ def self.run(params)
4242
unless params[:aab_path].nil?
4343
generate_split_apks(aab_path: params[:aab_path]) do |apk|
4444
split_name = File.basename(apk, '.apk')
45-
add_apk_size_metrics(helper: metrics_helper, apkanalyzer_bin:, apk:, split_name:)
45+
add_apk_size_metrics(helper: metrics_helper, apkanalyzer_bin: apkanalyzer_bin, apk: apk, split_name: split_name)
4646
end
4747
end
4848
unless params[:universal_apk_path].nil?
49-
add_apk_size_metrics(helper: metrics_helper, apkanalyzer_bin:, apk: params[:universal_apk_path], split_name: UNIVERSAL_APK_SPLIT_NAME)
49+
add_apk_size_metrics(helper: metrics_helper, apkanalyzer_bin: apkanalyzer_bin, apk: params[:universal_apk_path], split_name: UNIVERSAL_APK_SPLIT_NAME)
5050
end
5151
end
5252

5353
# Send the payload
5454
metrics_helper.send_metrics(
5555
to: api_url,
56-
api_token:,
56+
api_token: api_token,
5757
use_gzip: params[:use_gzip_content_encoding]
5858
)
5959
end

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def self.run(params)
1313
path = params[:release_notes_file_path]
1414
next_version = Fastlane::Helper::Android::VersionHelper.calc_next_release_short_version(params[:new_version])
1515

16-
Fastlane::Helper::ReleaseNotesHelper.add_new_section(path:, section_title: next_version)
16+
Fastlane::Helper::ReleaseNotesHelper.add_new_section(path: path, section_title: next_version)
1717
Fastlane::Helper::GitHelper.commit(message: "Release Notes: add new section for next version (#{next_version})", files: path)
1818

1919
UI.message 'Done.'

lib/fastlane/plugin/wpmreleasetoolkit/actions/common/buildkite_annotate_action.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ def self.run(params)
1414
else
1515
# Add new annotation using `buildkite-agent`
1616
extra_params = {
17-
context:,
18-
style:
17+
context: context,
18+
style: style
1919
}.compact.flat_map { |k, v| ["--#{k}", v] }
2020
sh('buildkite-agent', 'annotate', *extra_params, params[:message])
2121
end

lib/fastlane/plugin/wpmreleasetoolkit/actions/common/check_translation_progress.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def self.run(params)
1515

1616
unless under_threshold_langs.empty?
1717
check_results(
18-
under_threshold_langs:,
18+
under_threshold_langs: under_threshold_langs,
1919
threshold: params[:min_acceptable_translation_percentage],
2020
skip_confirm: params[:skip_confirm]
2121
)
@@ -37,7 +37,7 @@ def self.check_translations(glotpress_url:, language_codes:, abort_on_violations
3737
under_threshold_langs = []
3838

3939
data = begin
40-
Fastlane::Helper::GlotPressHelper.get_translation_status_data(glotpress_url:)
40+
Fastlane::Helper::GlotPressHelper.get_translation_status_data(glotpress_url: glotpress_url)
4141
rescue StandardError
4242
nil
4343
end
@@ -47,8 +47,8 @@ def self.check_translations(glotpress_url:, language_codes:, abort_on_violations
4747
UI.message("> Getting translation status for #{language_code}")
4848
progress = begin
4949
Fastlane::Helper::GlotPressHelper.get_translation_status(
50-
data:,
51-
language_code:
50+
data: data,
51+
language_code: language_code
5252
)
5353
rescue StandardError
5454
-1
@@ -60,7 +60,7 @@ def self.check_translations(glotpress_url:, language_codes:, abort_on_violations
6060
end
6161

6262
UI.message("Language #{language_code} is #{progress}% translated.")
63-
under_threshold_langs.push({ lang: language_code, progress: }) if progress < threshold
63+
under_threshold_langs.push({ lang: language_code, progress: progress }) if progress < threshold
6464
end
6565

6666
under_threshold_langs

0 commit comments

Comments
 (0)