Skip to content

Commit 2d4952c

Browse files
authored
Merge pull request #173 from OpenVoxProject/dependabot/bundler/rubocop-tw-1.80.0
Update rubocop requirement from ~> 1.79.0 to ~> 1.80.0
2 parents af03c5b + 328b42c commit 2d4952c

File tree

8 files changed

+19
-24
lines changed

8 files changed

+19
-24
lines changed

.rubocop_todo.yml

Lines changed: 10 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 --no-offense-counts --no-auto-gen-timestamp`
3-
# using RuboCop version 1.79.0.
3+
# using RuboCop version 1.80.0.
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
@@ -11,7 +11,6 @@ I18n/GetText/DecorateFunctionMessage:
1111
Enabled: false
1212

1313
# This cop supports safe autocorrection (--autocorrect).
14-
# Configuration parameters: AutoCorrect.
1514
I18n/GetText/DecorateString:
1615
Enabled: false
1716

@@ -130,19 +129,13 @@ Lint/ToJSON:
130129
- 'lib/puppet/pops/serialization/json.rb'
131130

132131
# This cop supports safe autocorrection (--autocorrect).
133-
# Configuration parameters: AutoCorrect, AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods, NotImplementedExceptions.
132+
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods, NotImplementedExceptions.
134133
# NotImplementedExceptions: NotImplementedError
135134
Lint/UnusedMethodArgument:
136135
Enabled: false
137136

138137
# This cop supports safe autocorrection (--autocorrect).
139-
# Configuration parameters: AutoCorrect.
140-
Lint/UselessAssignment:
141-
Exclude:
142-
- 'lib/puppet/application/face_base.rb'
143-
144-
# This cop supports safe autocorrection (--autocorrect).
145-
# Configuration parameters: AutoCorrect, CheckForMethodsWithNoSideEffects.
138+
# Configuration parameters: CheckForMethodsWithNoSideEffects.
146139
Lint/Void:
147140
Exclude:
148141
- 'lib/puppet/type/schedule.rb'
@@ -324,7 +317,7 @@ Style/DoubleNegation:
324317
- 'lib/puppet/util/feature.rb'
325318

326319
# This cop supports safe autocorrection (--autocorrect).
327-
# Configuration parameters: AutoCorrect, EnforcedStyle, AllowComments.
320+
# Configuration parameters: EnforcedStyle, AllowComments.
328321
# SupportedStyles: empty, nil, both
329322
Style/EmptyElse:
330323
Enabled: false
@@ -341,7 +334,7 @@ Style/EmptyLiteral:
341334
- 'lib/puppet/type.rb'
342335

343336
# This cop supports safe autocorrection (--autocorrect).
344-
# Configuration parameters: AutoCorrect, EnforcedStyle.
337+
# Configuration parameters: EnforcedStyle.
345338
# SupportedStyles: compact, expanded
346339
Style/EmptyMethod:
347340
Enabled: false
@@ -496,7 +489,6 @@ Style/MultilineMemoization:
496489
Exclude:
497490
- 'lib/puppet/application.rb'
498491
- 'lib/puppet/pops/types/types.rb'
499-
- 'lib/puppet/type.rb'
500492

501493
# This cop supports safe autocorrection (--autocorrect).
502494
Style/MultilineTernaryOperator:
@@ -574,6 +566,11 @@ Style/RedundantParentheses:
574566
- 'lib/puppet/type/tidy.rb'
575567
- 'lib/puppet/util/windows/com.rb'
576568

569+
# This cop supports unsafe autocorrection (--autocorrect-all).
570+
Style/RedundantSort:
571+
Exclude:
572+
- 'lib/puppet/provider/package/nim.rb'
573+
577574
# This cop supports safe autocorrection (--autocorrect).
578575
# Configuration parameters: EnforcedStyle.
579576
# SupportedStyles: implicit, explicit

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ group(:test) do
5353
gem 'webrick', '~> 1.7', require: false
5454
gem 'yard', require: false
5555

56-
gem 'rubocop', '~> 1.79.0', require: false, platforms: [:ruby]
56+
gem 'rubocop', '~> 1.80.0', require: false, platforms: [:ruby]
5757
gem 'rubocop-i18n', '~> 3.0', require: false, platforms: [:ruby]
5858
gem 'rubocop-performance', '~> 1.0', require: false, platforms: [:ruby]
5959
gem 'rubocop-rake', '~> 0.6', require: false, platforms: [:ruby]

lib/puppet/file_system.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ def self.readlink(path)
288288
# @api public
289289
#
290290
def self.unlink(*paths)
291-
@impl.unlink(*(paths.map { |p| assert_path(p) }))
291+
@impl.unlink(*paths.map { |p| assert_path(p) })
292292
end
293293

294294
# @return [File::Stat] object for the named file.

lib/puppet/indirector/catalog/compiler.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def inlineable?(resource, sources)
169169
elsif sources.empty?
170170
# TRANSLATORS Inlining refers to adding additional metadata (in this case we are not inlining)
171171
Puppet::Util::Profiler.profile(_("Not inlining resource without sources"), [:compiler, :static_compile_inlining, :skipped_file_metadata, :no_sources]) { false }
172-
elsif !(sources.all? { |source| source =~ /^puppet:/ })
172+
elsif !sources.all? { |source| source =~ /^puppet:/ }
173173
# TRANSLATORS Inlining refers to adding additional metadata (in this case we are not inlining)
174174
Puppet::Util::Profiler.profile(_("Not inlining unsupported source scheme"), [:compiler, :static_compile_inlining, :skipped_file_metadata, :unsupported_scheme]) { false }
175175
else

lib/puppet/indirector/file_bucket_file/file.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ def path_for(bucket_path, digest, subfile = nil)
234234
# @api private
235235
def verify_identical_file(contents_file, bucket_file)
236236
(bucket_file.to_binary.bytesize == Puppet::FileSystem.size(contents_file)) &&
237-
(bucket_file.stream() { |s| Puppet::FileSystem.compare_stream(contents_file, s) })
237+
bucket_file.stream() { |s| Puppet::FileSystem.compare_stream(contents_file, s) }
238238
end
239239

240240
# @param contents_file [Pathname] Opaque file path to intended backup

lib/puppet/pops/validation/checker4_0.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def initialize(diagnostics_producer)
4343
@acceptor = diagnostics_producer
4444

4545
# Use null migration checker unless given in context
46-
@migration_checker = (Puppet.lookup(:migration_checker) { Migration::MigrationChecker.new() })
46+
@migration_checker = Puppet.lookup(:migration_checker) { Migration::MigrationChecker.new() }
4747
end
4848

4949
# Validates the entire model by visiting each model element and calling `check`.

lib/puppet/provider/package/nim.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ def determine_latest_version(showres_output, package_name)
274274
[packages[package_name][version], nil]
275275
else
276276
versions = packages[package_name].keys
277-
latest_version = (versions.sort { |a, b| Puppet::Util::Package.versioncmp(b, a) })[0]
277+
latest_version = versions.sort { |a, b| Puppet::Util::Package.versioncmp(b, a) }[0]
278278
[packages[package_name][latest_version], latest_version]
279279
end
280280
end

lib/puppet/type.rb

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -374,11 +374,9 @@ def copy_metaparams(parameters)
374374
# @see uniqueness_key
375375
# @return [Array<Puppet::Parameter>] WARNING: this return type is uncertain
376376
def self.key_attribute_parameters
377-
@key_attribute_parameters ||= (
378-
@parameters.find_all { |param|
379-
param.isnamevar? or param.name == :name
380-
}
381-
)
377+
@key_attribute_parameters ||= @parameters.find_all { |param|
378+
param.isnamevar? or param.name == :name
379+
}
382380
end
383381

384382
# Returns cached {key_attribute_parameters} names.

0 commit comments

Comments
 (0)