Skip to content

Commit

Permalink
rubocop: Fix Style/FrozenStringLiteralComment
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak committed Jul 5, 2024
1 parent cd8688f commit aa61dc4
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 27 deletions.
3 changes: 3 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,7 @@ Style/TrailingCommaInArguments:
Enabled: true
EnforcedStyleForMultiline: comma

Style/IfUnlessModifier:
Enabled: false

inherit_from: .rubocop_todo.yml
30 changes: 4 additions & 26 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions lib/voxpupuli/test/facts.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'rspec-puppet-facts'
include RspecPuppetFacts

Expand Down
4 changes: 3 additions & 1 deletion lib/voxpupuli/test/rake.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'puppetlabs_spec_helper/rake_tasks'

PuppetLint.configuration.log_format = '%<path>s:%<line>s:%<check>s:%<KIND>s:%<message>s'
Expand All @@ -18,7 +20,7 @@
next if filename =~ %r{^((modules|acceptance|\.?vendor|spec/fixtures|pkg)/|REFERENCE.md)}

File.foreach(filename).each_with_index do |line, index|
if line =~ %r{\s\n$}
if line =~ /\s\n$/
errors << "#{filename} has trailing whitespace on line #{index + 1}"
end
end
Expand Down
2 changes: 2 additions & 0 deletions lib/voxpupuli/test/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'voxpupuli/test/facts'
require 'puppetlabs_spec_helper/module_spec_helper'

Expand Down

0 comments on commit aa61dc4

Please sign in to comment.