Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2023-01-23 23:49:41 +0300
committerStan Hu <stanhu@gmail.com>2023-01-23 23:49:41 +0300
commitf469d7780a1883775cf37927e7563775bb0cbbef (patch)
tree1f6988b18944bf5d0b12988b9bee00561d519ddd /_support
parent2cb51b78773f8c9342231160a5223119f242440c (diff)
Fix Rubocop errors in test-boot
`.rubocop_todo.yml` is loaded from the ruby directory via `make rubocop`. It's easier just to fix these 3 errors than to try to fix the script.
Diffstat (limited to '_support')
-rw-r--r--_support/.rubocop_todo.yml66
-rwxr-xr-x_support/test-boot6
2 files changed, 3 insertions, 69 deletions
diff --git a/_support/.rubocop_todo.yml b/_support/.rubocop_todo.yml
deleted file mode 100644
index 53cac49cb..000000000
--- a/_support/.rubocop_todo.yml
+++ /dev/null
@@ -1,66 +0,0 @@
-# This configuration was generated by
-# `rubocop --auto-gen-config`
-# on 2023-01-23 20:26:41 UTC using RuboCop version 1.38.0.
-# 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
-# versions of RuboCop, may require this file to be generated again.
-
-# Offense count: 1
-# This cop supports safe autocorrection (--autocorrect).
-# Configuration parameters: AllowInHeredoc.
-Layout/TrailingWhitespace:
- Exclude:
- - 'new-migration'
-
-# Offense count: 1
-# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods, CountRepeatedAttributes.
-Metrics/AbcSize:
- Max: 36
-
-# Offense count: 3
-# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, AllowedMethods, AllowedPatterns, IgnoredMethods.
-Metrics/MethodLength:
- Max: 42
-
-# Offense count: 1
-# Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
-Metrics/ParameterLists:
- Max: 7
-
-# Offense count: 1
-# This cop supports unsafe autocorrection (--autocorrect-all).
-# Configuration parameters: EnforcedStyle.
-# SupportedStyles: always, always_true, never
-Style/FrozenStringLiteralComment:
- Exclude:
- - 'new-migration'
-
-# Offense count: 1
-# This cop supports safe autocorrection (--autocorrect).
-Style/IfUnlessModifier:
- Exclude:
- - 'new-migration'
-
-# Offense count: 1
-# This cop supports unsafe autocorrection (--autocorrect-all).
-# Configuration parameters: EnforcedStyle.
-# SupportedStyles: literals, strict
-Style/MutableConstant:
- Exclude:
- - 'new-migration'
-
-# Offense count: 1
-# This cop supports unsafe autocorrection (--autocorrect-all).
-# Configuration parameters: RequireEnglish.
-# SupportedStyles: use_perl_names, use_english_names, use_builtin_english_names
-Style/SpecialGlobalVars:
- EnforcedStyle: use_perl_names
-
-# Offense count: 1
-# This cop supports safe autocorrection (--autocorrect).
-# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
-# SupportedStyles: single_quotes, double_quotes
-Style/StringLiterals:
- Exclude:
- - 'test-boot'
diff --git a/_support/test-boot b/_support/test-boot
index 095c61eb0..6678a89a8 100755
--- a/_support/test-boot
+++ b/_support/test-boot
@@ -7,7 +7,7 @@ require 'optparse'
ADDR = 'socket'
-def main(params)
+def main(params) # rubocop:disable Metrics/MethodLength
gitaly_dir = File.realpath(params[:dir])
build_dir = File.join(gitaly_dir, '_build')
bin_dir = File.join(build_dir, 'bin')
@@ -27,7 +27,7 @@ def main(params)
unless version.start_with?(version_from_file)
abort "\nversion check failed: VERSION file contained '#{version_from_file}'"\
" but 'gitaly -version' reported '#{version}'."\
- " If you are working from a fork, please fetch the latest tags."
+ ' If you are working from a fork, please fetch the latest tags.'
end
Dir.mktmpdir do |dir|
@@ -61,7 +61,7 @@ def main(params)
end
end
-def write_gitaly_config(config_path, bin_dir:, dir:, use_bundled_git:, git_path:, gitaly_dir:, gitlab_shell_dir:)
+def write_gitaly_config(config_path, bin_dir:, dir:, use_bundled_git:, git_path:, gitaly_dir:, gitlab_shell_dir:) # rubocop:disable Metrics/ParameterLists
File.write(config_path, <<~CONFIG
socket_path = "#{ADDR}"
bin_dir = "#{bin_dir}"