diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index f705c6d..ac8d92a 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2023-07-07 07:29:59 UTC using RuboCop version 1.50.2. +# on 2024-02-07 19:46:27 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 @@ -13,6 +13,7 @@ Lint/DuplicateBranch: - 'lib/puppet-syntax/templates.rb' # Offense count: 1 +# Configuration parameters: AllowedParentClasses. Lint/MissingSuper: Exclude: - 'lib/puppet-syntax/tasks/puppet-syntax.rb' @@ -29,6 +30,7 @@ Lint/SuppressedException: - 'Rakefile' # Offense count: 1 +# This cop supports unsafe autocorrection (--autocorrect-all). Lint/UselessAssignment: Exclude: - 'lib/puppet-syntax/templates.rb' @@ -113,6 +115,17 @@ RSpec/RepeatedDescription: Exclude: - 'spec/puppet-syntax/templates_spec.rb' +# Offense count: 4 +# Configuration parameters: Include, CustomTransform, IgnoreMethods, IgnoreMetadata. +# Include: **/*_spec.rb +RSpec/SpecFilePathFormat: + Exclude: + - '**/spec/routing/**/*' + - 'spec/puppet-syntax/hiera_spec.rb' + - 'spec/puppet-syntax/manifests_spec.rb' + - 'spec/puppet-syntax/templates_spec.rb' + - 'spec/puppet-syntax_spec.rb' + # Offense count: 3 RSpec/SubjectDeclaration: Exclude: diff --git a/puppet-syntax.gemspec b/puppet-syntax.gemspec index 211d37b..dce8de0 100644 --- a/puppet-syntax.gemspec +++ b/puppet-syntax.gemspec @@ -24,5 +24,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'pry' spec.add_development_dependency 'rb-readline' - spec.add_development_dependency 'voxpupuli-rubocop', '~> 2.0.0' + spec.add_development_dependency 'voxpupuli-rubocop', '~> 2.4.0' end diff --git a/spec/puppet-syntax/hiera_spec.rb b/spec/puppet-syntax/hiera_spec.rb index ccca1b5..1c182bb 100644 --- a/spec/puppet-syntax/hiera_spec.rb +++ b/spec/puppet-syntax/hiera_spec.rb @@ -10,14 +10,14 @@ it 'returns nothing from valid YAML' do files = fixture_hiera('hiera_good.yaml') res = subject.check(files) - expect(res).to be == [] + expect(res).to eq [] end it 'returns an error from invalid YAML' do files = fixture_hiera('hiera_bad.yaml') expected = /ERROR: Failed to parse #{files[0]}:/ res = subject.check(files) - expect(res.size).to be == 1 + expect(res.size).to eq 1 expect(res.first).to match(expected) end @@ -34,7 +34,7 @@ (1..examples).each do |n| expect(res).to include(/::warning#{n}/) end - expect(res.size).to be == examples + expect(res.size).to eq examples expect(res[0]).to match('Key :typical:typo::warning1: Looks like a missing colon') expect(res[1]).to match('Key ::notsotypical::warning2: Puppet automatic lookup will not use leading \'::\'') expect(res[2]).to match('Key :noCamelCase::warning3: Not a valid Puppet variable name for automatic lookup') @@ -50,7 +50,7 @@ (1..examples).each do |n| expect(res).to include(/::warning#{n}/) end - expect(res.size).to be == examples + expect(res.size).to eq examples expect(res[0]).to match('Key acme::warning1 has unknown eyaml method unknown-method') expect(res[1]).to match('Key acme::warning2 has unterminated eyaml value') expect(res[2]).to match('Key acme::warning3 has unpadded or truncated base64 data')