Skip to content

Commit db3e94f

Browse files
committed
Layout/SpaceAfterNot
This commit enables the Rubocop Layout/SpaceAfterNot cop and addresses all offenses.
1 parent 3b42e7d commit db3e94f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+129
-133
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ I18n/GetText/DecorateStringFormattingUsingPercent:
2222
I18n/RailsI18n/DecorateString:
2323
Enabled: false
2424

25-
# This cop supports safe auto-correction (--auto-correct).
26-
Layout/SpaceAfterNot:
27-
Enabled: false
28-
2925
# This cop supports safe auto-correction (--auto-correct).
3026
Layout/SpaceAfterSemicolon:
3127
Exclude:

lib/puppet/agent/disabler.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def enable
2626
def disable(msg=nil)
2727
data = {}
2828
Puppet.notice _("Disabling Puppet.")
29-
if (! msg.nil?)
29+
if (!msg.nil?)
3030
data[DISABLED_MESSAGE_JSON_KEY] = msg
3131
end
3232
disable_lockfile.lock(data)

lib/puppet/application/device.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ def main
375375
end
376376
end
377377

378-
if ! returns or returns.compact.empty?
378+
if !returns or returns.compact.empty?
379379
exit(1)
380380
elsif options[:detailed_exitcodes]
381381
# Bitwise OR the return codes together, puppet style

lib/puppet/confine/any.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ def self.summarize(confines)
66
end
77

88
def pass?(value)
9-
!! value
9+
!!value
1010
end
1111

1212
def message(value)

lib/puppet/confine/boolean.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def values
3636
return @cached_value unless @cached_value.nil?
3737

3838
# Double negate to coerce the value into a Boolean
39-
calculated_value = !! @values.first.call
39+
calculated_value = !!@values.first.call
4040
if calculated_value == passing_value
4141
@cached_value = [calculated_value]
4242
end

lib/puppet/confine/false.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def self.summarize(confines)
1414
end
1515

1616
def pass?(value)
17-
! value
17+
!value
1818
end
1919

2020
def message(value)

lib/puppet/confine/feature.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
class Puppet::Confine::Feature < Puppet::Confine
66
def self.summarize(confines)
7-
confines.collect { |c| c.values }.flatten.uniq.find_all { |value| ! confines[0].pass?(value) }
7+
confines.collect { |c| c.values }.flatten.uniq.find_all { |value| !confines[0].pass?(value) }
88
end
99

1010
# Is the named feature available?

lib/puppet/confine/true.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def self.summarize(confines)
1515

1616
def pass?(value)
1717
# Double negate, so we only get true or false.
18-
! ! value
18+
!!value
1919
end
2020

2121
def message(value)

lib/puppet/confine_collection.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ def summary
4949
end
5050

5151
def valid?
52-
! @confines.detect { |c| ! c.valid? }
52+
!@confines.detect { |c| !c.valid? }
5353
end
5454
end

lib/puppet/face/epp.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@
174174
if options[:e]
175175
buffer.print dump_parse(options[:e], 'command-line-string', options, false)
176176
elsif args.empty?
177-
if ! STDIN.tty?
177+
if !STDIN.tty?
178178
buffer.print dump_parse(STDIN.read, 'stdin', options, false)
179179
else
180180
raise Puppet::Error, _("No input to parse given on command line or stdin")
@@ -342,7 +342,7 @@
342342
if options[:e]
343343
buffer.print render_inline(options[:e], compiler, options)
344344
elsif args.empty?
345-
if ! STDIN.tty?
345+
if !STDIN.tty?
346346
buffer.print render_inline(STDIN.read, compiler, options)
347347
else
348348
raise Puppet::Error, _("No input to process given on command line or stdin")

0 commit comments

Comments
 (0)