Skip to content

Commit 611a44e

Browse files
authored
Merge pull request #21 from OpenVoxProject/dependabot/bundler/voxpupuli-rubocop-tw-4.2.0
Update voxpupuli-rubocop requirement from ~> 4.1.0 to ~> 4.2.0
2 parents f9bbcea + 0c27889 commit 611a44e

File tree

10 files changed

+23
-43
lines changed

10 files changed

+23
-43
lines changed

.rubocop_todo.yml

Lines changed: 14 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config --no-auto-gen-timestamp`
3-
# using RuboCop version 1.75.8.
3+
# using RuboCop version 1.79.2.
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
@@ -39,7 +39,7 @@ Layout/HeredocIndentation:
3939

4040
# Offense count: 4
4141
# This cop supports safe autocorrection (--autocorrect).
42-
# Configuration parameters: Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
42+
# Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
4343
# URISchemes: http, https
4444
Layout/LineLength:
4545
Exclude:
@@ -93,29 +93,11 @@ Lint/NonAtomicFileOperation:
9393
Exclude:
9494
- 'lib/packaging/ship/artifactory.rb'
9595

96-
# Offense count: 10
96+
# Offense count: 1
9797
# This cop supports safe autocorrection (--autocorrect).
9898
Lint/RedundantCopDisableDirective:
9999
Exclude:
100-
- 'lib/packaging/paths.rb'
101-
- 'lib/packaging/util/net.rb'
102-
- 'lib/packaging/util/ship.rb'
103100
- 'lib/packaging/util/version.rb'
104-
- 'spec/lib/packaging/util/git_spec.rb'
105-
- 'spec/lib/packaging/util/version_spec.rb'
106-
107-
# Offense count: 6
108-
# This cop supports safe autocorrection (--autocorrect).
109-
Lint/RedundantStringCoercion:
110-
Exclude:
111-
- 'lib/packaging/util/rake_utils.rb'
112-
- 'spec/lib/packaging/config_spec.rb'
113-
114-
# Offense count: 2
115-
Lint/ShadowingOuterLocalVariable:
116-
Exclude:
117-
- 'tasks/jenkins_dynamic.rake'
118-
- 'tasks/pe_ship.rake'
119101

120102
# Offense count: 1
121103
# Configuration parameters: AllowComments, AllowNil.
@@ -236,13 +218,22 @@ Naming/MethodParameterName:
236218
- 'lib/packaging/util/ship.rb'
237219
- 'tasks/vendor_gems.rake'
238220

221+
# Offense count: 3
222+
# Configuration parameters: Mode, AllowedMethods, AllowedPatterns, AllowBangMethods, WaywardPredicates.
223+
# AllowedMethods: call
224+
# WaywardPredicates: nonzero?
225+
Naming/PredicateMethod:
226+
Exclude:
227+
- 'lib/packaging/util.rb'
228+
- 'lib/packaging/util/misc.rb'
229+
239230
# Offense count: 6
240231
# Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros, UseSorbetSigs.
241232
# NamePrefix: is_, has_, have_, does_
242233
# ForbiddenPrefixes: is_, has_, have_, does_
243234
# AllowedMethods: is_a?
244235
# MethodDefinitionMacros: define_method, define_singleton_method
245-
Naming/PredicateName:
236+
Naming/PredicatePrefix:
246237
Exclude:
247238
- 'spec/**/*'
248239
- 'lib/packaging/sign/rpm.rb'
@@ -456,10 +447,6 @@ RSpec/MatchArray:
456447
RSpec/MessageSpies:
457448
EnforcedStyle: receive
458449

459-
# Offense count: 46
460-
RSpec/MultipleExpectations:
461-
Max: 7
462-
463450
# Offense count: 42
464451
# Configuration parameters: AllowSubject.
465452
RSpec/MultipleMemoizedHelpers:
@@ -810,7 +797,7 @@ Style/EvalWithLocation:
810797

811798
# Offense count: 47
812799
# This cop supports safe autocorrection (--autocorrect).
813-
# Configuration parameters: AllowedVars.
800+
# Configuration parameters: AllowedVars, DefaultToNil.
814801
Style/FetchEnvVar:
815802
Enabled: false
816803

lib/packaging/paths.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# This includes both reporting the correct path and divining the platform
33
# tag associated with a variety of paths
44
#
5-
# rubocop:disable Metrics/ModuleLength
65
module Pkg::Paths
76
include Pkg::Platforms
87

lib/packaging/util/net.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def remote_execute(target_host, command, user_options = {})
111111
###
112112
### Deprecated method implemented as a shim to the new `remote_execute` method
113113
###
114-
def remote_ssh_cmd(target, command, capture_output = false, extra_options = '', fail_fast = true, trace = false) # rubocop:disable Metrics/ParameterLists
114+
def remote_ssh_cmd(target, command, capture_output = false, extra_options = '', fail_fast = true, trace = false)
115115
puts "Warn: \"remote_ssh_cmd\" call in packaging is deprecated. Use \"remote_execute\" instead."
116116
remote_execute(target, command, {
117117
capture_output: capture_output,

lib/packaging/util/rake_utils.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ def invoke_task(task, *)
3636
def add_dependency(depender, dependency)
3737
if using_rake?
3838
if !task_defined?(depender)
39-
fail "Could not locate a Rake task named '#{depender.to_s}' to add a dependency of '#{dependency.to_s}' to"
39+
fail "Could not locate a Rake task named '#{depender}' to add a dependency of '#{dependency}' to"
4040
elsif !task_defined?(dependency)
41-
fail "Could not locate a Rake task named '#{dependency.to_s}' to add as a dependency of '#{depender.to_s}'"
41+
fail "Could not locate a Rake task named '#{dependency}' to add as a dependency of '#{depender}'"
4242
else
4343
depender_task = Rake::Task[depender]
4444
depender_task.enhance([dependency])

lib/packaging/util/ship.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
module Pkg::Util::Ship
44
module_function
55

6-
def collect_packages(pkg_exts, excludes = []) # rubocop:disable Metrics/MethodLength
6+
def collect_packages(pkg_exts, excludes = [])
77
pkgs = pkg_exts.map { |ext| Dir.glob(ext) }.flatten
88
return [] if pkgs.empty?
99

@@ -57,7 +57,6 @@ def reorganize_packages(pkgs, tmp, platform_independent = false, nonfinal = fals
5757
# false (most paths will be platform dependent), but set to true for gems
5858
# and tarballs since those just land directly under /opt/downloads/<project>
5959
#
60-
# rubocop:disable Metrics/MethodLength, Metrics/AbcSize
6160
def ship_pkgs(pkg_exts, staging_server, remote_path, opts = {})
6261
options = {
6362
excludes: [],

lib/packaging/util/version.rb

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ def extended_dot_version
8080
# 5.3.0.rc4-1
8181
# 3.0.5.rc6.24.g431768c-1
8282
#
83-
# rubocop:disable Metrics/AbcSize, Metrics/MethodLength
8483
def base_pkg_version(version = Pkg::Config.version)
8584
return "#{dot_version(version)}-#{Pkg::Config.release}".split('-') if final?(version) || Pkg::Config.vanagon_project
8685

@@ -143,13 +142,11 @@ def final?(version = Pkg::Config.version)
143142
# with the intent that it never change the official source tree.
144143
#
145144
# rubocop:disable Metrics/AbcSize
146-
# rubocop:disable Metrics/CyclomaticComplexity
147-
# rubocop:disable Metrics/PerceivedComplexity
148145
def versionbump(workdir = nil)
149146
version = ENV['VERSION'] || Pkg::Config.version.to_s.strip
150147
new_version = '"' + version + '"'
151148

152-
version_file = "#{workdir ? workdir + '/' : ''}#{Pkg::Config.version_file}"
149+
version_file = "#{workdir + '/' if workdir}#{Pkg::Config.version_file}"
153150

154151
# Read the previous version file in...
155152
contents = IO.read(version_file)
@@ -182,7 +179,7 @@ def versionbump(workdir = nil)
182179
# input json file and output if it "looks tagged" or not
183180
#
184181
# @param json_data [hash] json data hash containing the ref to check
185-
def report_json_tags(json_data) # rubocop:disable Metrics/AbcSize
182+
def report_json_tags(json_data)
186183
puts 'component: ' + File.basename(json_data['url'])
187184
puts 'ref: ' + json_data['ref'].to_s
188185
if Pkg::Util::Git.remote_tagged?(json_data['url'], json_data['ref'].to_s)

packaging.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Gem::Specification.new do |gem|
1515
gem.required_ruby_version = '>= 3.2.0'
1616

1717
gem.add_development_dependency('rspec', ['>= 2.14.1', '< 4'])
18-
gem.add_development_dependency('voxpupuli-rubocop', ['~> 4.1.0'])
18+
gem.add_development_dependency('voxpupuli-rubocop', '~> 4.2.0')
1919
gem.add_dependency('artifactory', ['~> 3'])
2020
gem.add_dependency('base64', ['< 0.4'])
2121
gem.add_dependency('benchmark', ['< 0.5'])

spec/lib/packaging/config_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
Build_Params.each do |param|
144144
it "should have r/w accessors for #{param}" do
145145
Pkg::Config.should respond_to(param)
146-
Pkg::Config.should respond_to("#{param.to_s}=")
146+
Pkg::Config.should respond_to("#{param}=")
147147
end
148148
end
149149
end
@@ -563,7 +563,7 @@
563563
Pkg::Config.load_envvars
564564
end
565565
else
566-
it "should set Pkg::Config##{v[:var]} to ENV[#{v[:envvar].to_s}]" do
566+
it "should set Pkg::Config##{v[:var]} to ENV[#{v[:envvar]}]" do
567567
ENV[v[:envvar].to_s] = "FOO"
568568
Pkg::Util.stub(:boolean_value) { "FOO" }
569569
allow(Pkg::Config).to receive(:instance_variable_set)

spec/lib/packaging/util/git_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
require 'spec_helper'
33
require 'packaging/util/git'
44

5-
# rubocop:disable Metrics/BlockLength
65
describe 'Pkg::Util::Git' do
76
context '#commit_file' do
87
let(:file) { 'thing.txt' }

spec/lib/packaging/util/version_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
# Spec tests for Pkg::Util::Version
55
#
6-
# rubocop:disable Metrics/BlockLength
76
describe 'Pkg::Util::Version' do
87
context '#versionbump' do
98
let(:version_file) { 'thing.txt' }

0 commit comments

Comments
 (0)