From a30cfe74a670836a6cf83f902dd66be4c283a094 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Fri, 21 Jun 2024 12:25:04 +0200 Subject: [PATCH] rubocop: Fix Style/FrozenStringLiteralComment --- .rubocop_todo.yml | 30 ++++-------------------------- lib/voxpupuli/test/facts.rb | 2 ++ lib/voxpupuli/test/rake.rb | 2 ++ lib/voxpupuli/test/spec_helper.rb | 10 ++++++++++ 4 files changed, 18 insertions(+), 26 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 69b8d56..e2058e2 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,37 +1,25 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2024-06-21 09:28:53 UTC using RuboCop version 1.50.2. +# on 2024-06-21 10:27: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 # versions of RuboCop, may require this file to be generated again. -# Offense count: 2 -# Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches. -Lint/DuplicateBranch: - Exclude: - - 'lib/voxpupuli/test/facts.rb' - -# Offense count: 1 -# Configuration parameters: AllowComments, AllowNil. -Lint/SuppressedException: - Exclude: - - 'Rakefile' - # Offense count: 1 # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes. Metrics/AbcSize: - Max: 19 + Max: 18 # Offense count: 1 # Configuration parameters: AllowedMethods, AllowedPatterns. Metrics/CyclomaticComplexity: - Max: 12 + Max: 10 # Offense count: 1 # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns. Metrics/MethodLength: - Max: 28 + Max: 24 # Offense count: 1 # Configuration parameters: Prefixes, AllowedPatterns. @@ -71,16 +59,6 @@ RSpec/MultipleDescribes: RSpec/MultipleExpectations: Max: 4 -# Offense count: 3 -# This cop supports unsafe autocorrection (--autocorrect-all). -# Configuration parameters: EnforcedStyle. -# SupportedStyles: always, always_true, never -Style/FrozenStringLiteralComment: - Exclude: - - 'lib/voxpupuli/test/facts.rb' - - 'lib/voxpupuli/test/rake.rb' - - 'lib/voxpupuli/test/spec_helper.rb' - # Offense count: 1 Style/MixinUsage: Exclude: diff --git a/lib/voxpupuli/test/facts.rb b/lib/voxpupuli/test/facts.rb index e8fa424..057b396 100644 --- a/lib/voxpupuli/test/facts.rb +++ b/lib/voxpupuli/test/facts.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'rspec-puppet-facts' include RspecPuppetFacts diff --git a/lib/voxpupuli/test/rake.rb b/lib/voxpupuli/test/rake.rb index 113cf0f..75b6b2c 100644 --- a/lib/voxpupuli/test/rake.rb +++ b/lib/voxpupuli/test/rake.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'puppetlabs_spec_helper/rake_tasks' PuppetLint.configuration.log_format = '%s:%s:%s:%s:%s' diff --git a/lib/voxpupuli/test/spec_helper.rb b/lib/voxpupuli/test/spec_helper.rb index 68b030a..fe954bc 100644 --- a/lib/voxpupuli/test/spec_helper.rb +++ b/lib/voxpupuli/test/spec_helper.rb @@ -1,3 +1,13 @@ +# frozen_string_literal: true + +RSpec.configure do |config| + # puppetlabs_spec_helper defaults to mocha but emits a deprecation warning + # Vox Pupuli prefers rspec to avoid the deprecation warning unless explicitly + # set + config.mock_with :rspec if config.instance_variable_get(:@mock_framework).nil? +end + +>>>>>>> d447e06 (rubocop: Fix Style/FrozenStringLiteralComment) require 'voxpupuli/test/facts' require 'puppetlabs_spec_helper/module_spec_helper'