From ac0ecb5fbe41a37d84e09270dead234d5f86afd1 Mon Sep 17 00:00:00 2001 From: Ian Maia Date: Wed, 7 Feb 2024 18:44:35 +0100 Subject: [PATCH] Run latest RuboCop version --- .rubocop_todo.yml | 10 +++++----- .../actions/ios/ios_extract_keys_from_strings_files.rb | 2 +- .../actions/ios/ios_send_app_size_metrics.rb | 2 +- .../actions/ios/ios_update_metadata_source.rb | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index fed1b0906..4f2be7855 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2023-11-08 13:49:19 UTC using RuboCop version 1.57.1. +# on 2024-02-07 17:44:01 UTC using RuboCop version 1.60.2. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new @@ -34,7 +34,7 @@ Naming/MethodParameterName: - 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_update_metadata_source_action.rb' - 'lib/fastlane/plugin/wpmreleasetoolkit/actions/common/gp_update_metadata_source.rb' -# Offense count: 109 +# Offense count: 110 # Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros. # NamePrefix: is_, has_, have_ # ForbiddenPrefixes: is_, has_, have_ @@ -60,7 +60,7 @@ RSpec/ContextWording: - 'spec/git_helper_spec.rb' - 'spec/ios_lint_localizations_spec.rb' -# Offense count: 61 +# Offense count: 62 # Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly. # Include: **/*_spec*rb*, **/spec/**/* RSpec/FilePath: @@ -73,7 +73,7 @@ RSpec/InstanceVariable: - 'spec/git_helper_spec.rb' - 'spec/ios_lint_localizations_spec.rb' -# Offense count: 109 +# Offense count: 122 # Configuration parameters: . # SupportedStyles: have_received, receive RSpec/MessageSpies: @@ -116,7 +116,7 @@ Security/Open: - 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_validate_lib_strings_action.rb' - 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_create_xml_release_notes.rb' -# Offense count: 123 +# Offense count: 124 # Configuration parameters: AllowedConstants. Style/Documentation: Enabled: false diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_extract_keys_from_strings_files.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_extract_keys_from_strings_files.rb index 64c24a2f4..411c8a54a 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_extract_keys_from_strings_files.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_extract_keys_from_strings_files.rb @@ -108,7 +108,7 @@ def self.available_options type: Hash, verify_block: proc do |values| UI.user_error!('`target_original_files` must contain at least one path to an original `.strings` file.') if values.empty? - values.each do |path, _| + values.each_key do |path| UI.user_error!("Path `#{path}` (found in `target_original_files`) does not exist.") unless File.exist?(path) UI.user_error! "Expected `#{path}` (found in `target_original_files`) to be a path ending in a `*.lproj/*.strings`." unless File.extname(path) == '.strings' && File.extname(File.dirname(path)) == '.lproj' end diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_send_app_size_metrics.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_send_app_size_metrics.rb index dd891108a..303a60098 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_send_app_size_metrics.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_send_app_size_metrics.rb @@ -31,7 +31,7 @@ def self.run(params) app_thinning_plist_path = params[:app_thinning_plist_path] || File.join(File.dirname(params[:ipa_path]), 'app-thinning.plist') if File.exist?(app_thinning_plist_path) plist = Plist.parse_xml(app_thinning_plist_path) - plist['variants'].each do |_key, variant| + plist['variants'].each_value do |variant| variant_descriptors = variant['variantDescriptors'] || [{ 'device' => 'Universal' }] variant_descriptors.each do |desc| variant_metadata = { device: desc['device'], 'OS Version': desc['os-version'] } diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_update_metadata_source.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_update_metadata_source.rb index d86b2e889..36096f34d 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_update_metadata_source.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_update_metadata_source.rb @@ -10,7 +10,7 @@ def self.run(params) release_version: params[:release_version]) Action.sh("git add #{params[:po_file_path]}") - params[:source_files].each do |_key, file| + params[:source_files].each_value do |file| Action.sh("git add #{file}") end