Skip to content

Commit ed76b89

Browse files
committed
(PUP-11993) Style/NestedParenthesizedCalls
This commit enables Style/NestedParenthesizedCalls cop and fixes 3 autocorrectable offenses.
1 parent 2b7ea50 commit ed76b89

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -629,13 +629,6 @@ Style/MultipleComparison:
629629
Style/MutableConstant:
630630
Enabled: false
631631

632-
# This cop supports safe auto-correction (--auto-correct).
633-
# Configuration parameters: AllowedMethods.
634-
# AllowedMethods: be, be_a, be_an, be_between, be_falsey, be_kind_of, be_instance_of, be_truthy, be_within, eq, eql, end_with, include, match, raise_error, respond_to, start_with
635-
Style/NestedParenthesizedCalls:
636-
Exclude:
637-
- 'lib/puppet/provider/user/directoryservice.rb'
638-
639632
# This cop supports safe auto-correction (--auto-correct).
640633
Style/NestedTernaryOperator:
641634
Exclude:

lib/puppet/provider/user/directoryservice.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def self.instances
9494
# Return an array of hashes containing information about every user on
9595
# the system.
9696
def self.get_all_users
97-
Puppet::Util::Plist.parse_plist(dscl '-plist', '.', 'readall', '/Users')
97+
Puppet::Util::Plist.parse_plist(dscl('-plist', '.', 'readall', '/Users'))
9898
end
9999

100100
# This method accepts an individual user plist, passed as a hash, and
@@ -171,15 +171,15 @@ def self.get_os_version
171171
# of the local groups on the machine.
172172
def self.get_list_of_groups
173173
# rubocop:disable Naming/MemoizedInstanceVariableName
174-
@groups ||= Puppet::Util::Plist.parse_plist(dscl '-plist', '.', 'readall', '/Groups')
174+
@groups ||= Puppet::Util::Plist.parse_plist(dscl('-plist', '.', 'readall', '/Groups'))
175175
# rubocop:enable Naming/MemoizedInstanceVariableName
176176
end
177177

178178
# Perform a dscl lookup at the path specified for the specific keyname
179179
# value. The value returned is the first item within the array returned
180180
# from dscl
181181
def self.get_attribute_from_dscl(path, username, keyname)
182-
Puppet::Util::Plist.parse_plist(dscl '-plist', '.', 'read', "/#{path}/#{username}", keyname)
182+
Puppet::Util::Plist.parse_plist(dscl('-plist', '.', 'read', "/#{path}/#{username}", keyname))
183183
end
184184

185185
# The plist embedded in the ShadowHashData key is a binary plist. The

0 commit comments

Comments
 (0)