Skip to content

Commit

Permalink
Merge pull request #90 from bastelfreak/vp
Browse files Browse the repository at this point in the history
switch to voxpupuli-rubocop
  • Loading branch information
david22swan authored Jun 28, 2024
2 parents c407756 + 41b3b49 commit e3c0a6e
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 46 deletions.
16 changes: 3 additions & 13 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
---
inherit_from: .rubocop_todo.yml

require:
- rubocop-performance
- rubocop-rspec

AllCops:
Exclude:
- Gemfile
- Rakefile
- spec/fixtures/**/*
- vendor/bundle/**/*
NewCops: enable
SuggestExtensions: false
TargetRubyVersion: '2.7'
inherit_gem:
voxpupuli-rubocop: rubocop.yml

# Disabled
Style/ClassAndModuleChildren:
Expand Down
97 changes: 68 additions & 29 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,29 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2023-04-18 09:21:48 UTC using RuboCop version 1.50.2.
# on 2024-06-28 11:45:55 UTC using RuboCop version 1.64.1.
# 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: 1
# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: Severity, Include.
# Include: **/*.gemspec
Gemspec/RequireMFA:
Layout/EmptyLines:
Exclude:
- 'puppet-modulebuilder.gemspec'
- 'Gemfile'
- 'Rakefile'

# Offense count: 1
# Configuration parameters: Severity, Include.
# Include: **/*.gemspec
Gemspec/RequiredRubyVersion:
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: Width, AllowedPatterns.
Layout/IndentationWidth:
Exclude:
- 'puppet-modulebuilder.gemspec'

# Offense count: 5
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
Metrics/AbcSize:
Max: 31

# Offense count: 1
# Configuration parameters: CountComments, CountAsOne.
Metrics/ClassLength:
Max: 255

# Offense count: 6
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
Metrics/MethodLength:
Max: 25
- 'Rakefile'

# Offense count: 1
# Configuration parameters: MinSize.
Performance/CollectionLiteralInLoop:
Lint/MixedRegexpCaptureTypes:
Exclude:
- 'spec/acceptance/puppet/modulebuilder/builder_spec.rb'
- 'Gemfile'

# Offense count: 4
# Configuration parameters: Prefixes, AllowedPatterns.
Expand Down Expand Up @@ -82,11 +65,67 @@ RSpec/NamedSubject:
RSpec/NestedGroups:
Max: 5

# Offense count: 33
# Offense count: 32
RSpec/SubjectStub:
Exclude:
- 'spec/unit/puppet/modulebuilder/builder_spec.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowedVars.
Style/FetchEnvVar:
Exclude:
- 'Gemfile'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle, EnforcedShorthandSyntax, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
# SupportedShorthandSyntax: always, never, either, consistent, either_consistent
Style/HashSyntax:
Exclude:
- 'Gemfile'

# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
Style/RedundantRegexpEscape:
Exclude:
- 'Gemfile'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle, AllowInnerSlashes.
# SupportedStyles: slashes, percent_r, mixed
Style/RegexpLiteral:
Exclude:
- 'Gemfile'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: MinSize.
# SupportedStyles: percent, brackets
Style/SymbolArray:
EnforcedStyle: brackets

# Offense count: 7
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyleForMultiline.
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
Style/TrailingCommaInArrayLiteral:
Exclude:
- 'lib/puppet/modulebuilder/builder.rb'
- 'spec/spec_helper.rb'
- 'spec/unit/puppet/modulebuilder/builder_spec.rb'

# Offense count: 3
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyleForMultiline.
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
Style/TrailingCommaInHashLiteral:
Exclude:
- 'lib/puppet/modulebuilder/builder.rb'
- 'spec/unit/puppet/modulebuilder/builder_spec.rb'

# Offense count: 9
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
Expand Down
4 changes: 0 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ group :development do
gem 'rake'
gem 'rspec', '~> 3.1'

gem 'rubocop', '~> 1.64.0', require: false
gem 'rubocop-performance', '~> 1.16', require: false
gem 'rubocop-rspec', '~> 3.0', require: false

gem 'simplecov'
gem 'simplecov-console'

Expand Down
6 changes: 6 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,9 @@ RSpec::Core::RakeTask.new(:acceptance) do |t|
end

task default: [:spec, :acceptance]

begin
require 'voxpupuli/rubocop/rake'
rescue LoadError
# the voxpupuli-rubocop gem is optional
end
2 changes: 2 additions & 0 deletions puppet-modulebuilder.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,7 @@ Gem::Specification.new do |spec|
spec.add_runtime_dependency 'minitar', '~> 0.9'
spec.add_runtime_dependency 'pathspec', '>= 0.2.1', '< 2.0.0'

spec.add_development_dependency 'voxpupuli-rubocop', '~> 2.8.0'

spec.required_ruby_version = Gem::Requirement.new('>= 2.7.0')
end

0 comments on commit e3c0a6e

Please sign in to comment.