Skip to content

Commit ed14bbd

Browse files
committed
(MODULES-11197) Reenable some cops
1 parent 725d469 commit ed14bbd

File tree

3 files changed

+9
-37
lines changed

3 files changed

+9
-37
lines changed

.rubocop.yml

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -72,24 +72,8 @@ Style/TrailingCommaInArrayLiteral:
7272
Style/SymbolArray:
7373
Description: Using percent style obscures symbolic intent of array's contents.
7474
EnforcedStyle: brackets
75-
Style/SignalException:
76-
Enabled: false
77-
Style/DoubleNegation:
78-
Enabled: false
79-
Style/MultipleComparison:
80-
Enabled: false
81-
Style/NumericPredicate:
82-
Enabled: false
8375
Layout/HeredocIndentation:
8476
Enabled: false
85-
Metrics/BlockNesting:
86-
Enabled: false
87-
Naming/AccessorMethodName:
88-
Enabled: false
89-
Naming/PredicateName:
90-
Enabled: false
91-
RSpec/VariableName:
92-
Enabled: false
9377
RSpec/MessageSpies:
9478
EnforcedStyle: receive
9579
Style/Documentation:
@@ -121,7 +105,7 @@ Performance/SortReverse:
121105
Performance/Squeeze:
122106
Enabled: true
123107
Performance/StringInclude:
124-
Enabled: false
108+
Enabled: true
125109
Performance/Sum:
126110
Enabled: true
127111
Style/CollectionMethods:
@@ -258,6 +242,8 @@ Metrics/AbcSize:
258242
Enabled: false
259243
Metrics/BlockLength:
260244
Enabled: false
245+
Metrics/BlockNesting:
246+
Enabled: false
261247
Metrics/ClassLength:
262248
Enabled: false
263249
Metrics/CyclomaticComplexity:
@@ -272,6 +258,8 @@ Metrics/PerceivedComplexity:
272258
Enabled: false
273259
Migration/DepartmentName:
274260
Enabled: false
261+
Naming/AccessorMethodName:
262+
Enabled: false
275263
Naming/BlockParameterName:
276264
Enabled: false
277265
Naming/HeredocDelimiterCase:
@@ -444,6 +432,8 @@ Style/MultilineWhenThen:
444432
Enabled: false
445433
Style/NegatedUnless:
446434
Enabled: false
435+
Style/NumericPredicate:
436+
Enabled: false
447437
Style/OptionalBooleanParameter:
448438
Enabled: false
449439
Style/OrAssignment:

.sync.yml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,9 @@
11
.rubocop.yml:
22
default_configs:
3-
Style/SignalException:
4-
Enabled: false
5-
Style/DoubleNegation:
6-
Enabled: false
7-
Style/MultipleComparison:
8-
Enabled: false
9-
Style/NumericPredicate:
10-
Enabled: false
11-
Style/SignalException:
12-
Enabled: false
133
Layout/HeredocIndentation:
144
Enabled: false
155
Layout/LineLength:
166
Enabled: false
17-
Metrics/BlockNesting:
18-
Enabled: false
19-
Naming/AccessorMethodName:
20-
Enabled: false
21-
Naming/PredicateName:
22-
Enabled: false
23-
RSpec/VariableName:
24-
Enabled: false
257
Gemfile:
268
optional:
279
":development":

lib/puppet/type/host.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def inclusive?
5555
newproperty(:comment) do
5656
desc 'A comment that will be attached to the line with a # character.'
5757
validate do |value|
58-
if value =~ %r{\n} || value =~ %r{\r}
58+
if value.include?("\n") || value.include?("\r")
5959
raise Puppet::Error, _('Comment cannot include newline')
6060
end
6161
end
@@ -85,7 +85,7 @@ def inclusive?
8585
raise Puppet::Error, _('Invalid host name')
8686
end
8787
end
88-
if value =~ %r{\n} || value =~ %r{\r}
88+
if value.include?("\n") || value.include?("\r")
8989
raise Puppet::Error, _('Hostname cannot include newline')
9090
end
9191
end

0 commit comments

Comments
 (0)