Skip to content

Commit

Permalink
add rubocop exception
Browse files Browse the repository at this point in the history
  • Loading branch information
schlitzered committed Feb 13, 2025
1 parent c75e54c commit 8a264db
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 19 deletions.
5 changes: 4 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,8 @@ Layout/LineLength:
####################################################
# ``Rspec/FilePath`` is going to be deprecated in the next major release of rubocop >=3.0.0: see <https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FilePath>
# As the new cops are already present, e.g., Rspec/SpecFilePathPathFormat, then disabling this in preparation
RSpec/FilePath:
RSpec/SpecFilePathFormat:
Enabled: false

RSpec/SpecFilePathSuffix:
Enabled: false
114 changes: 96 additions & 18 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2024-01-30 16:36:55 UTC using RuboCop version 1.50.2.
# on 2025-02-13 20:39:46 UTC using RuboCop version 1.71.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
Expand All @@ -15,7 +15,13 @@ Gemspec/RequireMFA:
- 'ruby-pwsh.gemspec'

# Offense count: 1
# Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches.
# This cop supports safe autocorrection (--autocorrect).
Layout/EmptyLineAfterGuardClause:
Exclude:
- 'lib/puppet/provider/dsc_base_provider/dsc_base_provider.rb'

# Offense count: 1
# Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches, IgnoreDuplicateElseBranch.
Lint/DuplicateBranch:
Exclude:
- 'lib/puppet/provider/dsc_base_provider/dsc_base_provider.rb'
Expand All @@ -32,31 +38,45 @@ Lint/IncompatibleIoSelectWithFiberScheduler:
Exclude:
- 'lib/pwsh.rb'

# Offense count: 17
# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
Lint/RedundantCopDisableDirective:
Exclude:
- 'lib/puppet/provider/dsc_base_provider/dsc_base_provider.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: strict, consistent
Lint/SymbolConversion:
Exclude:
- 'lib/puppet/provider/dsc_base_provider/dsc_base_provider.rb'

# Offense count: 16
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
Metrics/AbcSize:
Max: 83
Max: 63

# Offense count: 2
# Offense count: 1
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
# AllowedMethods: refine
Metrics/BlockLength:
Max: 35
Max: 28

# Offense count: 2
# Offense count: 1
# Configuration parameters: CountComments, CountAsOne.
Metrics/ClassLength:
Max: 553
Max: 296

# Offense count: 12
# Configuration parameters: AllowedMethods, AllowedPatterns.
Metrics/CyclomaticComplexity:
Max: 24

# Offense count: 23
# Offense count: 22
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
Metrics/MethodLength:
Max: 42
Max: 43

# Offense count: 10
# Configuration parameters: AllowedMethods, AllowedPatterns.
Expand All @@ -69,6 +89,7 @@ Metrics/PerceivedComplexity:
# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
Naming/FileName:
Exclude:
- 'Rakefile.rb'
- 'lib/ruby-pwsh.rb'

# Offense count: 1
Expand All @@ -77,6 +98,12 @@ Performance/CollectionLiteralInLoop:
Exclude:
- 'lib/puppet/provider/dsc_base_provider/dsc_base_provider.rb'

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
Performance/StringBytesize:
Exclude:
- 'lib/pwsh.rb'

# Offense count: 11
RSpec/AnyInstance:
Exclude:
Expand All @@ -85,9 +112,9 @@ RSpec/AnyInstance:
# Offense count: 5
RSpec/BeforeAfterAll:
Exclude:
- 'spec/spec_helper.rb'
- 'spec/rails_helper.rb'
- 'spec/support/**/*.rb'
- '**/spec/spec_helper.rb'
- '**/spec/rails_helper.rb'
- '**/spec/support/**/*.rb'
- 'spec/acceptance/dsc/basic.rb'

# Offense count: 26
Expand Down Expand Up @@ -118,12 +145,12 @@ RSpec/DescribeClass:
- 'spec/acceptance/dsc/complex.rb'
- 'spec/unit/pwsh_spec.rb'

# Offense count: 32
# Offense count: 38
# Configuration parameters: CountAsOne.
RSpec/ExampleLength:
Max: 70

# Offense count: 105
# Offense count: 151
# Configuration parameters: .
# SupportedStyles: have_received, receive
RSpec/MessageSpies:
Expand All @@ -134,7 +161,7 @@ RSpec/MultipleDescribes:
Exclude:
- 'spec/unit/pwsh_spec.rb'

# Offense count: 151
# Offense count: 157
RSpec/MultipleExpectations:
Max: 15

Expand All @@ -156,22 +183,73 @@ RSpec/NoExpectationExample:
- 'spec/unit/pwsh/windows_powershell_spec.rb'
- 'spec/unit/pwsh_spec.rb'

# Offense count: 56
# Offense count: 16
# This cop supports unsafe autocorrection (--autocorrect-all).
RSpec/ReceiveMessages:
Exclude:
- 'spec/unit/puppet/provider/dsc_base_provider/dsc_base_provider_spec.rb'

# Offense count: 86
RSpec/StubbedMock:
Exclude:
- 'spec/unit/puppet/provider/dsc_base_provider/dsc_base_provider_spec.rb'
- 'spec/unit/pwsh/util_spec.rb'
- 'spec/unit/pwsh/windows_powershell_spec.rb'

# Offense count: 65
# Offense count: 71
RSpec/SubjectStub:
Exclude:
- 'spec/unit/puppet/provider/dsc_base_provider/dsc_base_provider_spec.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
Style/CombinableDefined:
Exclude:
- 'lib/pwsh.rb'

# Offense count: 1
# Configuration parameters: AllowedConstants.
Style/Documentation:
Exclude:
- 'spec/**/*'
- 'test/**/*'
- 'lib/puppet/provider/dsc_base_provider/dsc_base_provider.rb'

# Offense count: 3
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: AllowedReceivers.
# AllowedReceivers: Thread.current
Style/HashEachMethods:
Exclude:
- 'lib/puppet/provider/dsc_base_provider/dsc_base_provider.rb'

# Offense count: 3
# This cop supports unsafe autocorrection (--autocorrect-all).
Style/HashSlice:
Exclude:
- 'lib/puppet/provider/dsc_base_provider/dsc_base_provider.rb'

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
Style/MapIntoArray:
Exclude:
- 'lib/puppet/provider/dsc_base_provider/dsc_base_provider.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
Style/RedundantRegexpArgument:
Exclude:
- 'spec/unit/pwsh_spec.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
Style/RedundantSelfAssignmentBranch:
Exclude:
- 'lib/puppet/provider/dsc_base_provider/dsc_base_provider.rb'

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: AllowedMethods, AllowedPatterns.
Style/ReturnNilInPredicateMethodDefinition:
Exclude:
- 'lib/puppet/provider/dsc_base_provider/dsc_base_provider.rb'

0 comments on commit 8a264db

Please sign in to comment.