Skip to content

Commit a337f6f

Browse files
committed
Lint/RedundantCopDisableDirective
Directives are no longer needed and can be removed.
1 parent a98ed06 commit a337f6f

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -649,12 +649,6 @@ Lint/NestedMethodDefinition:
649649
- 'lib/puppet/pops/types/types.rb'
650650
- 'lib/puppet/type.rb'
651651

652-
# This cop supports safe auto-correction (--auto-correct).
653-
Lint/RedundantCopDisableDirective:
654-
Exclude:
655-
- 'lib/puppet/pops/loader/static_loader.rb'
656-
- 'lib/puppet/util/posix.rb'
657-
658652
# This cop supports safe auto-correction (--auto-correct).
659653
Lint/RedundantRequireStatement:
660654
Exclude:

lib/puppet/pops/loader/static_loader.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def initialize
4545

4646
def discover(type, error_collector = nil, name_authority = Pcore::RUNTIME_NAME_AUTHORITY)
4747
# Static loader only contains runtime types
48-
return EMPTY_ARRAY unless type == :type && name_authority == name_authority = Pcore::RUNTIME_NAME_AUTHORITY #rubocop:disable Lint/AssignmentInCondition
48+
return EMPTY_ARRAY unless type == :type && name_authority == name_authority = Pcore::RUNTIME_NAME_AUTHORITY
4949

5050
typed_names = type == :type && name_authority == Pcore::RUNTIME_NAME_AUTHORITY ? @loaded.keys : EMPTY_ARRAY
5151
block_given? ? typed_names.select { |tn| yield(tn) } : typed_names

lib/puppet/util/posix.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def get_groups_list(user)
4040
user_gid = Puppet::Etc.getpwnam(user).gid
4141
ngroups = Puppet::FFI::POSIX::Constants::MAXIMUM_NUMBER_OF_GROUPS
4242

43-
while true do # rubocop:disable Lint/LiteralInCondition
43+
while true do
4444
FFI::MemoryPointer.new(:int) do |ngroups_ptr|
4545
FFI::MemoryPointer.new(:uint, ngroups) do |groups_ptr|
4646
old_ngroups = ngroups

0 commit comments

Comments
 (0)