Skip to content

Commit cca3806

Browse files
committed
Layout/CommentIndentation
This commit enables the Rubocop Layout/CommentIndentation cop.
1 parent d06220c commit cca3806

File tree

25 files changed

+71
-76
lines changed

25 files changed

+71
-76
lines changed

.rubocop_todo.yml

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

25-
# This cop supports safe auto-correction (--auto-correct).
26-
# Configuration parameters: AllowForAlignment.
27-
Layout/CommentIndentation:
28-
Enabled: false
29-
3025
# This cop supports safe auto-correction (--auto-correct).
3126
# Configuration parameters: EnforcedStyle.
3227
# SupportedStyles: leading, trailing

lib/puppet/application/script.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ def setup
248248
# installed where a settings catalog have already been applied...
249249
# This saves 1/5th of the startup time
250250

251-
# Puppet.settings.use :main, :agent, :ssl
251+
# Puppet.settings.use :main, :agent, :ssl
252252

253253
# When running a script, the catalog is not relevant, and neither is caching of it
254254
Puppet::Resource::Catalog.indirection.cache_class = nil

lib/puppet/defaults.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1273,7 +1273,7 @@ def self.initialize_default_settings!(settings)
12731273
}
12741274
)
12751275

1276-
# Define the config default.
1276+
# Define the config default.
12771277

12781278
settings.define_settings(:application,
12791279
:config_file_name => {
@@ -2054,7 +2054,7 @@ def self.initialize_default_settings!(settings)
20542054
}
20552055
)
20562056

2057-
# Central fact information.
2057+
# Central fact information.
20582058

20592059
settings.define_settings(
20602060
:main,

lib/puppet/metatype/manager.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ def clear_misses
3838
# @return [Object] the last returned value from the block.
3939
def eachtype
4040
@types.each do |_name, type|
41-
# Only consider types that have names
42-
#if ! type.parameters.empty? or ! type.validproperties.empty?
41+
# Only consider types that have names
42+
#if ! type.parameters.empty? or ! type.validproperties.empty?
4343
yield type
4444
#end
4545
end

lib/puppet/parameter/value_collection.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def munge(value)
121121
# @option options [Symbol] :event The event that should be emitted when this value is set.
122122
# @todo Option :event original comment says "event should be returned...", is "returned" the correct word
123123
# to use?
124-
# @option options [Symbol] :invalidate_refreshes True if a change on this property should invalidate and
124+
# @option options [Symbol] :invalidate_refreshes True if a change on this property should invalidate and
125125
# remove any scheduled refreshes (from notify or subscribe) targeted at the same resource. For example, if
126126
# a change in this property takes into account any changes that a scheduled refresh would have performed,
127127
# then the scheduled refresh would be deleted.

lib/puppet/parser/ast.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ def safeevaluate(scope)
3131
return self.evaluate(scope)
3232
rescue Puppet::Pops::Evaluator::PuppetStopIteration => detail
3333
raise detail
34-
# # Only deals with StopIteration from the break() function as a general
35-
# # StopIteration is a general runtime problem
36-
# raise Puppet::ParseError.new(detail.message, detail.file, detail.line, detail)
34+
# # Only deals with StopIteration from the break() function as a general
35+
# # StopIteration is a general runtime problem
36+
# raise Puppet::ParseError.new(detail.message, detail.file, detail.line, detail)
3737
rescue Puppet::Error => detail
3838
raise adderrorcontext(detail)
3939
rescue => detail

lib/puppet/parser/ast/pops_bridge.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def instantiate(modname)
103103
nil
104104
end
105105
end.flatten().compact() # flatten since node definition may have returned an array
106-
# Compact since 4x definitions are not understood by compiler
106+
# Compact since 4x definitions are not understood by compiler
107107
end
108108

109109
def evaluate(scope)

lib/puppet/parser/functions/require.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# frozen_string_literal: true
2-
# Requires the specified classes
1+
# frozen_string_literal: true
2+
# Requires the specified classes
33

44
Puppet::Parser::Functions::newfunction(
55
:require,

lib/puppet/pops/loader/loader_paths.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ def self.relative_paths_for_type(type, loader)
4545
result
4646
end
4747

48-
# # DO NOT REMOVE YET. needed later? when there is the need to decamel a classname
49-
# def de_camel(fq_name)
50-
# fq_name.to_s.gsub(/::/, '/').
51-
# gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
52-
# gsub(/([a-z\d])([A-Z])/,'\1_\2').
53-
# tr("-", "_").
54-
# downcase
55-
# end
48+
# # DO NOT REMOVE YET. needed later? when there is the need to decamel a classname
49+
# def de_camel(fq_name)
50+
# fq_name.to_s.gsub(/::/, '/').
51+
# gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
52+
# gsub(/([a-z\d])([A-Z])/,'\1_\2').
53+
# tr("-", "_").
54+
# downcase
55+
# end
5656

5757
class SmartPath
5858
# Creates SmartPath for the given loader (loader knows how to check for existence etc.)

lib/puppet/pops/loader/static_loader.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
2-
# Static Loader contains constants, basic data types and other types required for the system
3-
# to boot.
4-
#
2+
# Static Loader contains constants, basic data types and other types required for the system
3+
# to boot.
4+
#
55
module Puppet::Pops
66
module Loader
77
class StaticLoader < Loader

0 commit comments

Comments
 (0)