Skip to content

Commit 978296e

Browse files
committed
(PUP-11993) Move disabled cops to .rubocop.yml
This commit moves Style/RedundantException and Style/RedundantSelfAssignment from .rubocop_todo.yml to .rubocop.yml because when enabled, these cops cause a lot of spec test failures so these cops will be disabled indefinitely.
1 parent 17358f5 commit 978296e

File tree

2 files changed

+18
-20
lines changed

2 files changed

+18
-20
lines changed

.rubocop.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,24 @@ Layout/IndentationWidth:
3333
Layout/LineEndStringConcatenationIndentation:
3434
Enabled: true
3535

36+
# Enabling this cop will remove raising RuntimeErrors and cause spec test
37+
# failures
38+
Style/RedundantException:
39+
Exclude:
40+
- 'lib/puppet/file_bucket/dipper.rb'
41+
- 'lib/puppet/forge.rb'
42+
- 'lib/puppet/module_tool/applications/unpacker.rb'
43+
- 'lib/puppet/module_tool/local_tarball.rb'
44+
- 'lib/puppet/module_tool/tar.rb'
45+
- 'lib/puppet/pops/types/class_loader.rb'
46+
47+
# Enabling this cop causes a plethora of failed rspec tests, mostly
48+
# Errno::ENAMETOOLONG and Puppet::Context::UndefinedBindingError: Unable to
49+
# lookup 'environments' errors
50+
Style/RedundantSelfAssignment:
51+
Exclude:
52+
- 'lib/puppet/context.rb'
53+
3654
# Explicitly enables this cop new in 1.7
3755
Layout/SpaceBeforeBrackets:
3856
Enabled: true

.rubocop_todo.yml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -646,18 +646,6 @@ Style/OptionalBooleanParameter:
646646
Style/PreferredHashMethods:
647647
Enabled: false
648648

649-
# This cop supports safe auto-correction (--auto-correct).
650-
# Enabling this cop will remove raising RuntimeErrors and cause spec test
651-
# failures
652-
Style/RedundantException:
653-
Exclude:
654-
- 'lib/puppet/file_bucket/dipper.rb'
655-
- 'lib/puppet/forge.rb'
656-
- 'lib/puppet/module_tool/applications/unpacker.rb'
657-
- 'lib/puppet/module_tool/local_tarball.rb'
658-
- 'lib/puppet/module_tool/tar.rb'
659-
- 'lib/puppet/pops/types/class_loader.rb'
660-
661649
# This cop supports unsafe auto-correction (--auto-correct-all).
662650
Style/RedundantInterpolation:
663651
Enabled: false
@@ -671,14 +659,6 @@ Style/RedundantReturn:
671659
Style/RedundantSelf:
672660
Enabled: false
673661

674-
# This cop supports unsafe auto-correction (--auto-correct-all).
675-
# Enabling this cop causes a plethora of failed rspec tests, mostly
676-
# Errno::ENAMETOOLONG and Puppet::Context::UndefinedBindingError: Unable to
677-
# lookup 'environments' errors
678-
Style/RedundantSelfAssignment:
679-
Exclude:
680-
- 'lib/puppet/context.rb'
681-
682662
# This cop supports safe auto-correction (--auto-correct).
683663
# Configuration parameters: EnforcedStyle.
684664
# SupportedStyles: implicit, explicit

0 commit comments

Comments
 (0)