From 684306ab26bb26d10cd0659011c5944fb88780d6 Mon Sep 17 00:00:00 2001 From: Lukas Audzevicius Date: Mon, 22 Jan 2024 15:24:09 +0000 Subject: [PATCH 1/2] (CAT-1688) Upgrade rubocop Following a recent team decision, we are implementing a Rubocop Upgrade, moving the version from 1.48.1 to 1.50.0. This should be the final version until Puppet 7 is unsupported. --- .rubocop_todo.yml | 5 ++--- Gemfile | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 2a307f1a..f764d0b1 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2023-09-25 08:38:34 UTC using RuboCop version 1.56.3. +# on 2024-01-22 15:21:03 UTC using RuboCop version 1.50.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 @@ -123,7 +123,7 @@ RSpec/DescribeClass: - 'spec/acceptance/generate_markdown_spec.rb' - 'spec/acceptance/running_strings_generate_spec.rb' -# Offense count: 51 +# Offense count: 48 # Configuration parameters: CountAsOne. RSpec/ExampleLength: Max: 66 @@ -159,7 +159,6 @@ Style/ClassVars: - 'lib/puppet-strings/yard/templates/default/layout/html/setup.rb' # Offense count: 3 -# This cop supports unsafe autocorrection (--autocorrect-all). Style/CombinableLoops: Exclude: - 'lib/puppet-strings/markdown.rb' diff --git a/Gemfile b/Gemfile index 4cea4dd9..a59d8f8c 100644 --- a/Gemfile +++ b/Gemfile @@ -36,7 +36,7 @@ group :development do gem 'rspec', '~> 3.1' gem 'rspec-its', '~> 1.0' - gem 'rubocop', '~> 1.48', require: false + gem 'rubocop', '~> 1.50.0', require: false gem 'rubocop-performance', '~> 1.16', require: false gem 'rubocop-rspec', '~> 2.19', require: false From 7aa329046cb2984bd5e122a2ba93282348b3ca9a Mon Sep 17 00:00:00 2001 From: Lukas Audzevicius Date: Mon, 22 Jan 2024 15:37:32 +0000 Subject: [PATCH 2/2] Addressing LineLength --- .rubocop.yml | 3 +++ .rubocop_todo.yml | 7 ------- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 06ba896a..d0577de1 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -18,6 +18,9 @@ AllCops: Style/ClassAndModuleChildren: Enabled: false +Layout/LineLength: + Max: 200 + #################################################### # Cops below here due for deprecation #################################################### diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index f764d0b1..d927f4ef 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -187,10 +187,3 @@ Style/OptionalBooleanParameter: - 'lib/puppet-strings/yard/code_objects/type.rb' - 'lib/puppet-strings/yard/handlers/ruby/data_type_handler.rb' - 'lib/puppet-strings/yard/handlers/ruby/function_handler.rb' - -# Offense count: 136 -# This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns. -# URISchemes: http, https -Layout/LineLength: - Max: 199