Skip to content

Commit 60ca44a

Browse files
committed
rubocop: Fix coding style and extend some limits
1 parent 16d5693 commit 60ca44a

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

.rubocop_todo.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,23 +41,23 @@ Lint/Void:
4141
# Offense count: 10
4242
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
4343
Metrics/AbcSize:
44-
Max: 83
44+
Max: 85
4545

4646
# Offense count: 11
4747
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
4848
# AllowedMethods: refine
4949
Metrics/BlockLength:
50-
Max: 199
50+
Max: 256
5151

5252
# Offense count: 4
5353
# Configuration parameters: AllowedMethods, AllowedPatterns.
5454
Metrics/CyclomaticComplexity:
55-
Max: 30
55+
Max: 32
5656

5757
# Offense count: 13
5858
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
5959
Metrics/MethodLength:
60-
Max: 44
60+
Max: 50
6161

6262
# Offense count: 1
6363
# Configuration parameters: Max, CountKeywordArgs.

lib/puppet/provider/logical_volume/lvm.rb

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,7 @@ def create
119119
args << @resource[:volume_group]
120120
end
121121

122-
if @resource[:yes_flag]
123-
args.push('--yes')
124-
end
122+
args.push('--yes') if @resource[:yes_flag]
125123
lvcreate(*args)
126124
end
127125

@@ -188,9 +186,8 @@ def size=(new_size)
188186

189187
if resizeable
190188
args = []
191-
if @resource[:yes_flag]
192-
args.push('--yes')
193-
end
189+
args.push('--yes') if @resource[:yes_flag]
190+
194191
lvextend('-L', new_size, path, *args) || raise("Cannot extend to size #{new_size} because lvextend failed.")
195192

196193
unless @resource[:resize_fs] == :false || @resource[:resize_fs] == false || @resource[:resize_fs] == 'false'

lib/puppet/type/logical_volume.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def insync?(is)
181181
end
182182

183183
newparam(:yes_flag) do
184-
desc "If set to true, do not prompt for confirmation interactively but always assume the answer yes."
184+
desc 'If set to true, do not prompt for confirmation interactively but always assume the answer yes.'
185185
defaultto false
186186
end
187187

0 commit comments

Comments
 (0)