Merge remote-tracking branch 'origin/master' into leap_master
[puppet_stdlib.git] / .rubocop.yml
1 require: rubocop-rspec
2 AllCops:
3   TargetRubyVersion: 1.9
4   Include:
5     - ./**/*.rb
6   Exclude:
7     - vendor/**/*
8     - .vendor/**/*
9     - pkg/**/*
10     - spec/fixtures/**/*
11 Lint/ConditionPosition:
12   Enabled: True
13
14 Lint/ElseLayout:
15   Enabled: True
16
17 Lint/UnreachableCode:
18   Enabled: True
19
20 Lint/UselessComparison:
21   Enabled: True
22
23 Lint/EnsureReturn:
24   Enabled: True
25
26 Lint/HandleExceptions:
27   Enabled: True
28
29 Lint/LiteralInCondition:
30   Enabled: True
31
32 Lint/ShadowingOuterLocalVariable:
33   Enabled: True
34
35 Lint/LiteralInInterpolation:
36   Enabled: True
37
38 Style/HashSyntax:
39   Enabled: True
40
41 Style/RedundantReturn:
42   Enabled: True
43
44 Lint/AmbiguousOperator:
45   Enabled: True
46
47 Lint/AssignmentInCondition:
48   Enabled: True
49
50 Style/SpaceBeforeComment:
51   Enabled: True
52
53 Style/AndOr:
54   Enabled: True
55
56 Style/RedundantSelf:
57   Enabled: True
58
59 # Method length is not necessarily an indicator of code quality
60 Metrics/MethodLength:
61   Enabled: False
62
63 # Module length is not necessarily an indicator of code quality
64 Metrics/ModuleLength:
65   Enabled: False
66
67 Style/WhileUntilModifier:
68   Enabled: True
69
70 Lint/AmbiguousRegexpLiteral:
71   Enabled: True
72
73 Lint/Eval:
74   Enabled: True
75
76 Lint/BlockAlignment:
77   Enabled: True
78
79 Lint/DefEndAlignment:
80   Enabled: True
81
82 Lint/EndAlignment:
83   Enabled: True
84
85 Lint/DeprecatedClassMethods:
86   Enabled: True
87
88 Lint/Loop:
89   Enabled: True
90
91 Lint/ParenthesesAsGroupedExpression:
92   Enabled: True
93
94 Lint/RescueException:
95   Enabled: True
96
97 Lint/StringConversionInInterpolation:
98   Enabled: True
99
100 Lint/UnusedBlockArgument:
101   Enabled: True
102
103 Lint/UnusedMethodArgument:
104   Enabled: True
105
106 Lint/UselessAccessModifier:
107   Enabled: True
108
109 Lint/UselessAssignment:
110   Enabled: True
111
112 Lint/Void:
113   Enabled: True
114
115 Style/AccessModifierIndentation:
116   Enabled: True
117
118 Style/AccessorMethodName:
119   Enabled: True
120
121 Style/Alias:
122   Enabled: True
123
124 Style/AlignArray:
125   Enabled: True
126
127 Style/AlignHash:
128   Enabled: True
129
130 Style/AlignParameters:
131   Enabled: True
132
133 Metrics/BlockNesting:
134   Enabled: True
135
136 Style/AsciiComments:
137   Enabled: True
138
139 Style/Attr:
140   Enabled: True
141
142 Style/BracesAroundHashParameters:
143   Enabled: True
144
145 Style/CaseEquality:
146   Enabled: True
147
148 Style/CaseIndentation:
149   Enabled: True
150
151 Style/CharacterLiteral:
152   Enabled: True
153
154 Style/ClassAndModuleCamelCase:
155   Enabled: True
156
157 Style/ClassAndModuleChildren:
158   Enabled: False
159
160 Style/ClassCheck:
161   Enabled: True
162
163 # Class length is not necessarily an indicator of code quality
164 Metrics/ClassLength:
165   Enabled: False
166
167 Style/ClassMethods:
168   Enabled: True
169
170 Style/ClassVars:
171   Enabled: True
172
173 Style/WhenThen:
174   Enabled: True
175
176 Style/WordArray:
177   Enabled: True
178
179 Style/UnneededPercentQ:
180   Enabled: True
181
182 Style/Tab:
183   Enabled: True
184
185 Style/SpaceBeforeSemicolon:
186   Enabled: True
187
188 Style/TrailingBlankLines:
189   Enabled: True
190
191 Style/SpaceInsideBlockBraces:
192   Enabled: True
193
194 Style/SpaceInsideBrackets:
195   Enabled: True
196
197 Style/SpaceInsideHashLiteralBraces:
198   Enabled: True
199
200 Style/SpaceInsideParens:
201   Enabled: True
202
203 Style/LeadingCommentSpace:
204   Enabled: True
205
206 Style/SpaceBeforeFirstArg:
207   Enabled: True
208
209 Style/SpaceAfterColon:
210   Enabled: True
211
212 Style/SpaceAfterComma:
213   Enabled: True
214
215 Style/SpaceAfterMethodName:
216   Enabled: True
217
218 Style/SpaceAfterNot:
219   Enabled: True
220
221 Style/SpaceAfterSemicolon:
222   Enabled: True
223
224 Style/SpaceAroundEqualsInParameterDefault:
225   Enabled: True
226
227 Style/SpaceAroundOperators:
228   Enabled: True
229
230 Style/SpaceBeforeBlockBraces:
231   Enabled: True
232
233 Style/SpaceBeforeComma:
234   Enabled: True
235
236 Style/CollectionMethods:
237   Enabled: True
238
239 Style/CommentIndentation:
240   Enabled: True
241
242 Style/ColonMethodCall:
243   Enabled: True
244
245 Style/CommentAnnotation:
246   Enabled: True
247
248 # 'Complexity' is very relative
249 Metrics/CyclomaticComplexity:
250   Enabled: False
251
252 Style/ConstantName:
253   Enabled: True
254
255 Style/Documentation:
256   Enabled: False
257
258 Style/DefWithParentheses:
259   Enabled: True
260
261 Style/PreferredHashMethods:
262   Enabled: True
263
264 Style/DotPosition:
265   EnforcedStyle: trailing
266
267 Style/DoubleNegation:
268   Enabled: True
269
270 Style/EachWithObject:
271   Enabled: True
272
273 Style/EmptyLineBetweenDefs:
274   Enabled: True
275
276 Style/IndentArray:
277   Enabled: True
278
279 Style/IndentHash:
280   Enabled: True
281
282 Style/IndentationConsistency:
283   Enabled: True
284
285 Style/IndentationWidth:
286   Enabled: True
287
288 Style/EmptyLines:
289   Enabled: True
290
291 Style/EmptyLinesAroundAccessModifier:
292   Enabled: True
293
294 Style/EmptyLiteral:
295   Enabled: True
296
297 # Configuration parameters: AllowURI, URISchemes.
298 Metrics/LineLength:
299   Enabled: False
300
301 Style/MethodCallParentheses:
302   Enabled: True
303
304 Style/MethodDefParentheses:
305   Enabled: True
306
307 Style/LineEndConcatenation:
308   Enabled: True
309
310 Style/TrailingWhitespace:
311   Enabled: True
312
313 Style/StringLiterals:
314   Enabled: True
315
316 Style/TrailingCommaInArguments:
317   Enabled: True
318
319 Style/TrailingCommaInLiteral:
320   Enabled: True
321
322 Style/GlobalVars:
323   Enabled: True
324
325 Style/GuardClause:
326   Enabled: True
327
328 Style/IfUnlessModifier:
329   Enabled: True
330
331 Style/MultilineIfThen:
332   Enabled: True
333
334 Style/NegatedIf:
335   Enabled: True
336
337 Style/NegatedWhile:
338   Enabled: True
339
340 Style/Next:
341   Enabled: True
342
343 Style/SingleLineBlockParams:
344   Enabled: True
345
346 Style/SingleLineMethods:
347   Enabled: True
348
349 Style/SpecialGlobalVars:
350   Enabled: True
351
352 Style/TrivialAccessors:
353   Enabled: True
354
355 Style/UnlessElse:
356   Enabled: True
357
358 Style/VariableInterpolation:
359   Enabled: True
360
361 Style/VariableName:
362   Enabled: True
363
364 Style/WhileUntilDo:
365   Enabled: True
366
367 Style/EvenOdd:
368   Enabled: True
369
370 Style/FileName:
371   Enabled: True
372
373 Style/For:
374   Enabled: True
375
376 Style/Lambda:
377   Enabled: True
378
379 Style/MethodName:
380   Enabled: True
381
382 Style/MultilineTernaryOperator:
383   Enabled: True
384
385 Style/NestedTernaryOperator:
386   Enabled: True
387
388 Style/NilComparison:
389   Enabled: True
390
391 Style/FormatString:
392   Enabled: True
393
394 Style/MultilineBlockChain:
395   Enabled: True
396
397 Style/Semicolon:
398   Enabled: True
399
400 Style/SignalException:
401   Enabled: True
402
403 Style/NonNilCheck:
404   Enabled: True
405
406 Style/Not:
407   Enabled: True
408
409 Style/NumericLiterals:
410   Enabled: True
411
412 Style/OneLineConditional:
413   Enabled: True
414
415 Style/OpMethod:
416   Enabled: True
417
418 Style/ParenthesesAroundCondition:
419   Enabled: True
420
421 Style/PercentLiteralDelimiters:
422   Enabled: True
423
424 Style/PerlBackrefs:
425   Enabled: True
426
427 Style/PredicateName:
428   Enabled: True
429
430 Style/RedundantException:
431   Enabled: True
432
433 Style/SelfAssignment:
434   Enabled: True
435
436 Style/Proc:
437   Enabled: True
438
439 Style/RaiseArgs:
440   Enabled: True
441
442 Style/RedundantBegin:
443   Enabled: True
444
445 Style/RescueModifier:
446   Enabled: True
447
448 # based on https://github.com/voxpupuli/modulesync_config/issues/168
449 Style/RegexpLiteral:
450   EnforcedStyle: percent_r
451   Enabled: True
452
453 Lint/UnderscorePrefixedVariableName:
454   Enabled: True
455
456 Metrics/ParameterLists:
457   Enabled: False
458
459 Lint/RequireParentheses:
460   Enabled: True
461
462 Style/SpaceBeforeFirstArg:
463   Enabled: True
464
465 Style/ModuleFunction:
466   Enabled: True
467
468 Lint/Debugger:
469   Enabled: True
470
471 Style/IfWithSemicolon:
472   Enabled: True
473
474 Style/Encoding:
475   Enabled: True
476
477 Style/BlockDelimiters:
478   Enabled: True
479
480 Style/MultilineBlockLayout:
481   Enabled: True
482
483 # 'Complexity' is very relative
484 Metrics/AbcSize:
485   Enabled: False
486
487 # 'Complexity' is very relative
488 Metrics/PerceivedComplexity:
489   Enabled: False
490
491 Lint/UselessAssignment:
492   Enabled: True
493
494 Style/ClosingParenthesisIndentation:
495   Enabled: False
496
497 # RSpec
498
499 # We don't use rspec in this way
500 RSpec/DescribeClass:
501   Enabled: False
502
503 # Example length is not necessarily an indicator of code quality
504 RSpec/ExampleLength:
505   Enabled: False
506
507 RSpec/NamedSubject:
508   Enabled: False