Skip to content

Commit cf4a606

Browse files
committed
Disable Layout cops on == method
The Puppet::Pops::Validation::Diagnostic#== method triggers multiple Rubocop Layout offenses. Despite that, it's unclear if there is another way to format the method to improve readability. This commit disables all Rubocop Layout cops on this method.
1 parent 7b33fc3 commit cf4a606

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/puppet/pops/validation.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ def initialize severity, issue, file, source_pos, arguments = {}, exception = ni
243243

244244
# Two diagnostics are considered equal if the have the same issue, location and severity
245245
# (arguments and exception are ignored)
246-
# rubocop:disable Layout/ExtraSpacing
246+
# rubocop:disable Layout
247247
def ==(o)
248248
self.class == o.class &&
249249
same_position?(o) &&
@@ -252,7 +252,7 @@ def ==(o)
252252
severity == o.severity
253253
end
254254
alias eql? ==
255-
# rubocop:enable Layout/ExtraSpacing
255+
# rubocop:enable Layout
256256

257257
# Position is equal if the diagnostic is not located or if referring to the same offset
258258
def same_position?(o)

0 commit comments

Comments
 (0)