Skip to content

Commit 0f6c702

Browse files
Merge pull request #494 from wordpress-mobile/fix/rubocop-violations
Fix Rubocop violations
2 parents 6a0f5e5 + 5e66fdb commit 0f6c702

File tree

70 files changed

+310
-508
lines changed

Some content is hidden

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

70 files changed

+310
-508
lines changed

.rubocop_todo.yml

Lines changed: 40 additions & 228 deletions
Large diffs are not rendered by default.

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,21 +133,21 @@ def self.available_options
133133
description: 'The path of the .po file to update',
134134
type: String,
135135
verify_block: proc do |value|
136-
UI.user_error!("No .po file path for UpdateMetadataSourceAction given, pass using `po_file_path: 'file path'`") unless value && (!value.empty?)
136+
UI.user_error!("No .po file path for UpdateMetadataSourceAction given, pass using `po_file_path: 'file path'`") unless value && !value.empty?
137137
UI.user_error!("Couldn't find file at path '#{value}'") unless File.exist?(value)
138138
end),
139139
FastlaneCore::ConfigItem.new(key: :release_version,
140140
env_name: 'FL_UPDATE_METADATA_SOURCE_RELEASE_VERSION',
141141
description: 'The release version of the app (to use to mark the release notes)',
142142
verify_block: proc do |value|
143-
UI.user_error!("No relase version for UpdateMetadataSourceAction given, pass using `release_version: 'version'`") unless value && (!value.empty?)
143+
UI.user_error!("No relase version for UpdateMetadataSourceAction given, pass using `release_version: 'version'`") unless value && !value.empty?
144144
end),
145145
FastlaneCore::ConfigItem.new(key: :source_files,
146146
env_name: 'FL_UPDATE_METADATA_SOURCE_SOURCE_FILES',
147147
description: 'The hash with the path to the source files and the key to use to include their content',
148148
type: Hash,
149149
verify_block: proc do |value|
150-
UI.user_error!("No source file hash for UpdateMetadataSourceAction given, pass using `source_files: 'source file hash'`") unless value && (!value.empty?)
150+
UI.user_error!("No source file hash for UpdateMetadataSourceAction given, pass using `source_files: 'source file hash'`") unless value && !value.empty?
151151
end),
152152
]
153153
end

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def self.run(params)
1212
source_diff = nil
1313
if diff_url.nil? == false
1414
data = open(params[:diff_url])
15-
source_diff = data.read()
15+
source_diff = data.read
1616
end
1717

1818
any_error = false

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
end
4343

4444
# Check local repo status
45-
other_action.ensure_git_status_clean()
45+
other_action.ensure_git_status_clean
4646

4747
# Return the current version
4848
[next_beta_version, next_alpha_version]

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

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

88
UI.user_error!("Can't build beta and final at the same time!") if params[:final] && params[:beta]
99

10-
Fastlane::Helper::GitHelper.ensure_on_branch!('release') unless other_action.is_ci()
10+
Fastlane::Helper::GitHelper.ensure_on_branch!('release') unless other_action.is_ci
1111

1212
message = ''
1313
beta_version = Fastlane::Helper::Android::VersionHelper.get_release_version unless !params[:beta] && !params[:final]
@@ -26,7 +26,7 @@ def self.run(params)
2626
end
2727

2828
# Check local repo status
29-
other_action.ensure_git_status_clean() unless other_action.is_ci()
29+
other_action.ensure_git_status_clean unless other_action.is_ci
3030
end
3131

3232
#####################################################

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def self.run(params)
2525
Fastlane::Helper::Android::VersionHelper.update_versions(new_version_beta, new_version_alpha)
2626
UI.message 'Done!'
2727

28-
Fastlane::Helper::Android::GitHelper.commit_version_bump()
28+
Fastlane::Helper::Android::GitHelper.commit_version_bump
2929
end
3030

3131
#####################################################

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def self.run(params)
2323
Fastlane::Helper::Android::VersionHelper.update_versions(final_version, current_version_alpha)
2424
UI.message 'Done!'
2525

26-
Fastlane::Helper::Android::GitHelper.commit_version_bump()
26+
Fastlane::Helper::Android::GitHelper.commit_version_bump
2727
end
2828

2929
#####################################################

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def self.run(params)
2121
Fastlane::Helper::Android::VersionHelper.update_versions(new_version, nil)
2222
UI.message 'Done!'
2323

24-
Fastlane::Helper::Android::GitHelper.commit_version_bump()
24+
Fastlane::Helper::Android::GitHelper.commit_version_bump
2525

2626
UI.message 'Done.'
2727
end

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

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

3737
UI.message 'Updating app version...'
3838
Fastlane::Helper::Android::VersionHelper.update_versions(new_version_beta, new_version_alpha)
39-
Fastlane::Helper::Android::GitHelper.commit_version_bump()
39+
Fastlane::Helper::Android::GitHelper.commit_version_bump
4040
UI.message 'Done.'
4141
end
4242

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

Lines changed: 3 additions & 3 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:
@@ -33,7 +33,7 @@ def self.run(params)
3333
end
3434

3535
# Check local repo status
36-
other_action.ensure_git_status_clean()
36+
other_action.ensure_git_status_clean
3737

3838
# Return the current version
3939
Fastlane::Helper::Android::VersionHelper.get_public_version

0 commit comments

Comments
 (0)