Merge pull request #963 from puppetlabs/pdksync
[puppet-modules/puppetlabs-apt.git] / .rubocop.yml
1 ---
2 require:
3 - rubocop-performance
4 - rubocop-rspec
5 AllCops:
6   DisplayCopNames: true
7   TargetRubyVersion: '2.4'
8   Include:
9   - "**/*.rb"
10   Exclude:
11   - bin/*
12   - ".vendor/**/*"
13   - "**/Gemfile"
14   - "**/Rakefile"
15   - pkg/**/*
16   - spec/fixtures/**/*
17   - vendor/**/*
18   - "**/Puppetfile"
19   - "**/Vagrantfile"
20   - "**/Guardfile"
21 Layout/LineLength:
22   Description: People have wide screens, use them.
23   Max: 200
24 RSpec/BeforeAfterAll:
25   Description: Beware of using after(:all) as it may cause state to leak between tests.
26     A necessary evil in acceptance testing.
27   Exclude:
28   - spec/acceptance/**/*.rb
29 RSpec/HookArgument:
30   Description: Prefer explicit :each argument, matching existing module's style
31   EnforcedStyle: each
32 Style/BlockDelimiters:
33   Description: Prefer braces for chaining. Mostly an aesthetical choice. Better to
34     be consistent then.
35   EnforcedStyle: braces_for_chaining
36 Style/ClassAndModuleChildren:
37   Description: Compact style reduces the required amount of indentation.
38   EnforcedStyle: compact
39 Style/EmptyElse:
40   Description: Enforce against empty else clauses, but allow `nil` for clarity.
41   EnforcedStyle: empty
42 Style/FormatString:
43   Description: Following the main puppet project's style, prefer the % format format.
44   EnforcedStyle: percent
45 Style/FormatStringToken:
46   Description: Following the main puppet project's style, prefer the simpler template
47     tokens over annotated ones.
48   EnforcedStyle: template
49 Style/Lambda:
50   Description: Prefer the keyword for easier discoverability.
51   EnforcedStyle: literal
52 Style/RegexpLiteral:
53   Description: Community preference. See https://github.com/voxpupuli/modulesync_config/issues/168
54   EnforcedStyle: percent_r
55 Style/TernaryParentheses:
56   Description: Checks for use of parentheses around ternary conditions. Enforce parentheses
57     on complex expressions for better readability, but seriously consider breaking
58     it up.
59   EnforcedStyle: require_parentheses_when_complex
60 Style/TrailingCommaInArguments:
61   Description: Prefer always trailing comma on multiline argument lists. This makes
62     diffs, and re-ordering nicer.
63   EnforcedStyleForMultiline: comma
64 Style/TrailingCommaInArrayLiteral:
65   Description: Prefer always trailing comma on multiline literals. This makes diffs,
66     and re-ordering nicer.
67   EnforcedStyleForMultiline: comma
68 Style/SymbolArray:
69   Description: Using percent style obscures symbolic intent of array's contents.
70   EnforcedStyle: brackets
71 RSpec/MessageSpies:
72   EnforcedStyle: receive
73 Style/Documentation:
74   Exclude:
75   - lib/puppet/parser/functions/**/*
76   - spec/**/*
77 Style/WordArray:
78   EnforcedStyle: brackets
79 Performance/AncestorsInclude:
80   Enabled: true
81 Performance/BigDecimalWithNumericArgument:
82   Enabled: true
83 Performance/BlockGivenWithExplicitBlock:
84   Enabled: true
85 Performance/Caller:
86   Enabled: true
87 Performance/CaseWhenSplat:
88   Enabled: true
89 Performance/Casecmp:
90   Enabled: true
91 Performance/CollectionLiteralInLoop:
92   Exclude:
93   - spec/**/*
94   Enabled: true
95 Performance/CompareWithBlock:
96   Enabled: true
97 Performance/ConstantRegexp:
98   Enabled: true
99 Performance/Count:
100   Enabled: true
101 Performance/Detect:
102   Enabled: true
103 Performance/DoubleStartEndWith:
104   Enabled: true
105 Performance/EndWith:
106   Enabled: true
107 Performance/FixedSize:
108   Enabled: true
109 Performance/FlatMap:
110   Enabled: true
111 Performance/MethodObjectAsBlock:
112   Enabled: true
113 Performance/RangeInclude:
114   Enabled: true
115 Performance/RedundantBlockCall:
116   Enabled: true
117 Performance/RedundantMatch:
118   Enabled: true
119 Performance/RedundantMerge:
120   Enabled: true
121 Performance/RedundantSortBlock:
122   Enabled: true
123 Performance/RedundantStringChars:
124   Enabled: true
125 Performance/RegexpMatch:
126   Enabled: true
127 Performance/ReverseEach:
128   Enabled: true
129 Performance/ReverseFirst:
130   Enabled: true
131 Performance/Size:
132   Enabled: true
133 Performance/SortReverse:
134   Enabled: true
135 Performance/Squeeze:
136   Enabled: true
137 Performance/StartWith:
138   Enabled: true
139 Performance/StringInclude:
140   Enabled: true
141 Performance/StringReplacement:
142   Enabled: true
143 Performance/Sum:
144   Enabled: true
145 Performance/TimesMap:
146   Enabled: true
147 Style/CollectionMethods:
148   Enabled: true
149 Style/MethodCalledOnDoEndBlock:
150   Enabled: true
151 Style/StringMethods:
152   Enabled: true
153 Bundler/InsecureProtocolSource:
154   Enabled: false
155 Gemspec/DuplicatedAssignment:
156   Enabled: false
157 Gemspec/OrderedDependencies:
158   Enabled: false
159 Gemspec/RequiredRubyVersion:
160   Enabled: false
161 Gemspec/RubyVersionGlobalsUsage:
162   Enabled: false
163 Layout/ArgumentAlignment:
164   Enabled: false
165 Layout/BeginEndAlignment:
166   Enabled: false
167 Layout/ClosingHeredocIndentation:
168   Enabled: false
169 Layout/EmptyComment:
170   Enabled: false
171 Layout/EmptyLineAfterGuardClause:
172   Enabled: false
173 Layout/EmptyLinesAroundArguments:
174   Enabled: false
175 Layout/EmptyLinesAroundAttributeAccessor:
176   Enabled: false
177 Layout/EndOfLine:
178   Enabled: false
179 Layout/FirstArgumentIndentation:
180   Enabled: false
181 Layout/HashAlignment:
182   Enabled: false
183 Layout/HeredocIndentation:
184   Enabled: false
185 Layout/LeadingEmptyLines:
186   Enabled: false
187 Layout/SpaceAroundMethodCallOperator:
188   Enabled: false
189 Layout/SpaceInsideArrayLiteralBrackets:
190   Enabled: false
191 Layout/SpaceInsideReferenceBrackets:
192   Enabled: false
193 Lint/BigDecimalNew:
194   Enabled: false
195 Lint/BooleanSymbol:
196   Enabled: false
197 Lint/ConstantDefinitionInBlock:
198   Enabled: false
199 Lint/DeprecatedOpenSSLConstant:
200   Enabled: false
201 Lint/DisjunctiveAssignmentInConstructor:
202   Enabled: false
203 Lint/DuplicateBranch:
204   Enabled: false
205 Lint/DuplicateElsifCondition:
206   Enabled: false
207 Lint/DuplicateRegexpCharacterClassElement:
208   Enabled: false
209 Lint/DuplicateRequire:
210   Enabled: false
211 Lint/DuplicateRescueException:
212   Enabled: false
213 Lint/EmptyBlock:
214   Enabled: false
215 Lint/EmptyClass:
216   Enabled: false
217 Lint/EmptyConditionalBody:
218   Enabled: false
219 Lint/EmptyFile:
220   Enabled: false
221 Lint/ErbNewArguments:
222   Enabled: false
223 Lint/FloatComparison:
224   Enabled: false
225 Lint/HashCompareByIdentity:
226   Enabled: false
227 Lint/IdentityComparison:
228   Enabled: false
229 Lint/InterpolationCheck:
230   Enabled: false
231 Lint/MissingCopEnableDirective:
232   Enabled: false
233 Lint/MixedRegexpCaptureTypes:
234   Enabled: false
235 Lint/NestedPercentLiteral:
236   Enabled: false
237 Lint/NoReturnInBeginEndBlocks:
238   Enabled: false
239 Lint/NonDeterministicRequireOrder:
240   Enabled: false
241 Lint/OrderedMagicComments:
242   Enabled: false
243 Lint/OutOfRangeRegexpRef:
244   Enabled: false
245 Lint/RaiseException:
246   Enabled: false
247 Lint/RedundantCopEnableDirective:
248   Enabled: false
249 Lint/RedundantRequireStatement:
250   Enabled: false
251 Lint/RedundantSafeNavigation:
252   Enabled: false
253 Lint/RedundantWithIndex:
254   Enabled: false
255 Lint/RedundantWithObject:
256   Enabled: false
257 Lint/RegexpAsCondition:
258   Enabled: false
259 Lint/ReturnInVoidContext:
260   Enabled: false
261 Lint/SafeNavigationConsistency:
262   Enabled: false
263 Lint/SafeNavigationWithEmpty:
264   Enabled: false
265 Lint/SelfAssignment:
266   Enabled: false
267 Lint/SendWithMixinArgument:
268   Enabled: false
269 Lint/ShadowedArgument:
270   Enabled: false
271 Lint/StructNewOverride:
272   Enabled: false
273 Lint/ToEnumArguments:
274   Enabled: false
275 Lint/ToJSON:
276   Enabled: false
277 Lint/TopLevelReturnWithArgument:
278   Enabled: false
279 Lint/TrailingCommaInAttributeDeclaration:
280   Enabled: false
281 Lint/UnexpectedBlockArity:
282   Enabled: false
283 Lint/UnmodifiedReduceAccumulator:
284   Enabled: false
285 Lint/UnreachableLoop:
286   Enabled: false
287 Lint/UriEscapeUnescape:
288   Enabled: false
289 Lint/UriRegexp:
290   Enabled: false
291 Lint/UselessMethodDefinition:
292   Enabled: false
293 Lint/UselessTimes:
294   Enabled: false
295 Metrics/AbcSize:
296   Enabled: false
297 Metrics/BlockLength:
298   Enabled: false
299 Metrics/ClassLength:
300   Enabled: false
301 Metrics/CyclomaticComplexity:
302   Enabled: false
303 Metrics/MethodLength:
304   Enabled: false
305 Metrics/ModuleLength:
306   Enabled: false
307 Metrics/ParameterLists:
308   Enabled: false
309 Metrics/PerceivedComplexity:
310   Enabled: false
311 Migration/DepartmentName:
312   Enabled: false
313 Naming/AccessorMethodName:
314   Enabled: false
315 Naming/BlockParameterName:
316   Enabled: false
317 Naming/HeredocDelimiterCase:
318   Enabled: false
319 Naming/HeredocDelimiterNaming:
320   Enabled: false
321 Naming/MemoizedInstanceVariableName:
322   Enabled: false
323 Naming/MethodParameterName:
324   Enabled: false
325 Naming/RescuedExceptionsVariableName:
326   Enabled: false
327 RSpec/Be:
328   Enabled: false
329 RSpec/Capybara/CurrentPathExpectation:
330   Enabled: false
331 RSpec/Capybara/FeatureMethods:
332   Enabled: false
333 RSpec/Capybara/VisibilityMatcher:
334   Enabled: false
335 RSpec/ContextMethod:
336   Enabled: false
337 RSpec/ContextWording:
338   Enabled: false
339 RSpec/DescribeClass:
340   Enabled: false
341 RSpec/EmptyHook:
342   Enabled: false
343 RSpec/EmptyLineAfterExample:
344   Enabled: false
345 RSpec/EmptyLineAfterExampleGroup:
346   Enabled: false
347 RSpec/EmptyLineAfterHook:
348   Enabled: false
349 RSpec/ExampleLength:
350   Enabled: false
351 RSpec/ExampleWithoutDescription:
352   Enabled: false
353 RSpec/ExpectChange:
354   Enabled: false
355 RSpec/ExpectInHook:
356   Enabled: false
357 RSpec/FactoryBot/AttributeDefinedStatically:
358   Enabled: false
359 RSpec/FactoryBot/CreateList:
360   Enabled: false
361 RSpec/FactoryBot/FactoryClassName:
362   Enabled: false
363 RSpec/HooksBeforeExamples:
364   Enabled: false
365 RSpec/ImplicitBlockExpectation:
366   Enabled: false
367 RSpec/ImplicitSubject:
368   Enabled: false
369 RSpec/LeakyConstantDeclaration:
370   Enabled: false
371 RSpec/LetBeforeExamples:
372   Enabled: false
373 RSpec/MissingExampleGroupArgument:
374   Enabled: false
375 RSpec/MultipleExpectations:
376   Enabled: false
377 RSpec/MultipleMemoizedHelpers:
378   Enabled: false
379 RSpec/MultipleSubjects:
380   Enabled: false
381 RSpec/NestedGroups:
382   Enabled: false
383 RSpec/PredicateMatcher:
384   Enabled: false
385 RSpec/ReceiveCounts:
386   Enabled: false
387 RSpec/ReceiveNever:
388   Enabled: false
389 RSpec/RepeatedExampleGroupBody:
390   Enabled: false
391 RSpec/RepeatedExampleGroupDescription:
392   Enabled: false
393 RSpec/RepeatedIncludeExample:
394   Enabled: false
395 RSpec/ReturnFromStub:
396   Enabled: false
397 RSpec/SharedExamples:
398   Enabled: false
399 RSpec/StubbedMock:
400   Enabled: false
401 RSpec/UnspecifiedException:
402   Enabled: false
403 RSpec/VariableDefinition:
404   Enabled: false
405 RSpec/VoidExpect:
406   Enabled: false
407 RSpec/Yield:
408   Enabled: false
409 Security/Open:
410   Enabled: false
411 Style/AccessModifierDeclarations:
412   Enabled: false
413 Style/AccessorGrouping:
414   Enabled: false
415 Style/ArgumentsForwarding:
416   Enabled: false
417 Style/AsciiComments:
418   Enabled: false
419 Style/BisectedAttrAccessor:
420   Enabled: false
421 Style/CaseLikeIf:
422   Enabled: false
423 Style/ClassEqualityComparison:
424   Enabled: false
425 Style/CollectionCompact:
426   Enabled: false
427 Style/ColonMethodDefinition:
428   Enabled: false
429 Style/CombinableLoops:
430   Enabled: false
431 Style/CommentedKeyword:
432   Enabled: false
433 Style/Dir:
434   Enabled: false
435 Style/DocumentDynamicEvalDefinition:
436   Enabled: false
437 Style/DoubleCopDisableDirective:
438   Enabled: false
439 Style/EmptyBlockParameter:
440   Enabled: false
441 Style/EmptyLambdaParameter:
442   Enabled: false
443 Style/Encoding:
444   Enabled: false
445 Style/EvalWithLocation:
446   Enabled: false
447 Style/ExpandPathArguments:
448   Enabled: false
449 Style/ExplicitBlockArgument:
450   Enabled: false
451 Style/ExponentialNotation:
452   Enabled: false
453 Style/FloatDivision:
454   Enabled: false
455 Style/GlobalStdStream:
456   Enabled: false
457 Style/HashAsLastArrayItem:
458   Enabled: false
459 Style/HashLikeCase:
460   Enabled: false
461 Style/HashTransformKeys:
462   Enabled: false
463 Style/HashTransformValues:
464   Enabled: false
465 Style/IfUnlessModifier:
466   Enabled: false
467 Style/KeywordParametersOrder:
468   Enabled: false
469 Style/MinMax:
470   Enabled: false
471 Style/MixinUsage:
472   Enabled: false
473 Style/MultilineWhenThen:
474   Enabled: false
475 Style/NegatedIfElseCondition:
476   Enabled: false
477 Style/NegatedUnless:
478   Enabled: false
479 Style/NilLambda:
480   Enabled: false
481 Style/NumericPredicate:
482   Enabled: false
483 Style/OptionalBooleanParameter:
484   Enabled: false
485 Style/OrAssignment:
486   Enabled: false
487 Style/RandomWithOffset:
488   Enabled: false
489 Style/RedundantArgument:
490   Enabled: false
491 Style/RedundantAssignment:
492   Enabled: false
493 Style/RedundantCondition:
494   Enabled: false
495 Style/RedundantConditional:
496   Enabled: false
497 Style/RedundantFetchBlock:
498   Enabled: false
499 Style/RedundantFileExtensionInRequire:
500   Enabled: false
501 Style/RedundantRegexpCharacterClass:
502   Enabled: false
503 Style/RedundantRegexpEscape:
504   Enabled: false
505 Style/RedundantSelfAssignment:
506   Enabled: false
507 Style/RedundantSort:
508   Enabled: false
509 Style/RescueStandardError:
510   Enabled: false
511 Style/SingleArgumentDig:
512   Enabled: false
513 Style/SlicingWithRange:
514   Enabled: false
515 Style/SoleNestedConditional:
516   Enabled: false
517 Style/StderrPuts:
518   Enabled: false
519 Style/StringConcatenation:
520   Enabled: false
521 Style/Strip:
522   Enabled: false
523 Style/SwapValues:
524   Enabled: false
525 Style/SymbolProc:
526   Enabled: false
527 Style/TrailingBodyOnClass:
528   Enabled: false
529 Style/TrailingBodyOnMethodDefinition:
530   Enabled: false
531 Style/TrailingBodyOnModule:
532   Enabled: false
533 Style/TrailingCommaInHashLiteral:
534   Enabled: false
535 Style/TrailingMethodEndStatement:
536   Enabled: false
537 Style/UnpackFirst:
538   Enabled: false