-
Notifications
You must be signed in to change notification settings - Fork 1
/
config_defaults.yml
576 lines (558 loc) · 17.3 KB
/
config_defaults.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
---
.gitattributes:
include:
'*.rb': 'eol=lf'
'*.erb': 'eol=lf'
'*.pp': 'eol=lf'
'*.sh': 'eol=lf'
.gitignore:
required: &ignorepaths
- '.git/'
- '.*.sw[op]'
- '.metadata'
- '.yardoc'
- '.yardwarns'
- '*.iml'
- '/.bundle/'
- '/.idea/'
- '/.vagrant/'
- '/coverage/'
- '/bin/'
- '/doc/'
- '/Gemfile.local'
- '/Gemfile.lock'
- '/junit/'
- '/log/'
- '/pkg/'
- '/spec/fixtures/manifests/'
- '/spec/fixtures/modules/'
- '/tmp/'
- '/vendor/'
- '/convert_report.txt'
- '/update_report.txt'
- '.DS_Store'
.pdkignore:
required: *ignorepaths
.travis.yml:
ruby_versions:
- 2.4.4
global_env:
- BEAKER_PUPPET_COLLECTION=puppet5 PUPPET_GEM_VERSION="~> 5.0"
bundler_args: --without system_tests
docker_sets:
docker_defaults:
# values will replace @@SET@@ with the docker_sets' value
rvm: 2.4.4
sudo: required
dist: trusty
services: docker
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_set=@@SET@@ BEAKER_TESTMODE=@@TESTMODE@@
script: bundle exec rake beaker
includes:
- env: CHECK="syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop"
- env: CHECK=parallel_spec
- env: PUPPET_GEM_VERSION="~> 4.0" CHECK=parallel_spec
rvm: 2.1.9
deploy: true
user: 'puppet'
branches:
- master
- /^v\d/
.yardopts:
markup: markdown
appveyor.yml:
appveyor_bundle_install: "bundle install --jobs 4 --retry 2 --without system_tests"
matrix:
- RUBY_VERSION: 24-x64
CHECK: "syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop"
- PUPPET_GEM_VERSION: ~> 4.0
RUBY_VERSION: 21
CHECK: parallel_spec
- PUPPET_GEM_VERSION: ~> 4.0
RUBY_VERSION: 21-x64
CHECK: parallel_spec
- PUPPET_GEM_VERSION: ~> 5.0
RUBY_VERSION: 24
CHECK: parallel_spec
- PUPPET_GEM_VERSION: ~> 5.0
RUBY_VERSION: 24-x64
CHECK: parallel_spec
test_script:
- bundle exec rake %CHECK%
Rakefile:
default_disabled_lint_checks:
- 'relative'
extras: []
.rubocop.yml:
selected_profile: strict
default_configs: &default_configs
Metrics/LineLength:
Description: People have wide screens, use them.
Max: 200
# RSpec cops
RSpec/BeforeAfterAll:
Description: Beware of using after(:all) as it may cause state to leak between tests. A necessary evil in acceptance testing.
Exclude:
- 'spec/acceptance/**/*.rb'
RSpec/HookArgument:
Description: Prefer explicit :each argument, matching existing module's style
EnforcedStyle: each
# Style Cops
Style/BlockDelimiters:
Description: Prefer braces for chaining. Mostly an aesthetical choice. Better to be consistent then.
EnforcedStyle: braces_for_chaining
Style/ClassAndModuleChildren:
Description: Compact style reduces the required amount of indentation.
EnforcedStyle: compact
Style/EmptyElse:
Description: Enforce against empty else clauses, but allow `nil` for clarity.
EnforcedStyle: empty
Style/FormatString:
Description: Following the main puppet project's style, prefer the % format format.
EnforcedStyle: percent
Style/FormatStringToken:
Description: Following the main puppet project's style, prefer the simpler template tokens over annotated ones.
EnforcedStyle: template
Style/Lambda:
Description: Prefer the keyword for easier discoverability.
EnforcedStyle: literal
Style/RegexpLiteral:
Description: Community preference. See https://github.com/voxpupuli/modulesync_config/issues/168
EnforcedStyle: percent_r
Style/TernaryParentheses:
Description: Checks for use of parentheses around ternary conditions. Enforce parentheses on complex expressions for better readability, but seriously consider breaking it up.
EnforcedStyle: require_parentheses_when_complex
Style/TrailingCommaInArguments:
Description: Prefer always trailing comma on multiline argument lists. This makes diffs, and re-ordering nicer.
EnforcedStyleForMultiline: comma
Style/TrailingCommaInLiteral:
Description: Prefer always trailing comma on multiline literals. This makes diffs, and re-ordering nicer.
EnforcedStyleForMultiline: comma
Style/SymbolArray:
Description: Using percent style obscures symbolic intent of array's contents.
EnforcedStyle: brackets
cleanup_cops: &cleanup_cops
Bundler/OrderedGems:
Layout/AccessModifierIndentation:
Layout/AlignArray:
Layout/AlignHash:
Layout/AlignParameters:
Layout/BlockEndNewline:
Layout/CaseIndentation:
Layout/ClosingParenthesisIndentation:
Layout/CommentIndentation:
Layout/DotPosition:
Layout/ElseAlignment:
Layout/EmptyLineAfterMagicComment:
Layout/EmptyLineBetweenDefs:
Layout/EmptyLines:
Layout/EmptyLinesAroundAccessModifier:
Layout/EmptyLinesAroundBlockBody:
Layout/EmptyLinesAroundClassBody:
Layout/EmptyLinesAroundExceptionHandlingKeywords:
Layout/EmptyLinesAroundMethodBody:
Layout/EmptyLinesAroundModuleBody:
Layout/ExtraSpacing:
Layout/FirstParameterIndentation:
Layout/IndentArray:
Layout/IndentAssignment:
Layout/IndentHash:
Layout/IndentationConsistency:
Layout/IndentationWidth:
Layout/InitialIndentation:
Layout/LeadingCommentSpace:
Layout/MultilineArrayBraceLayout:
Layout/MultilineBlockLayout:
Layout/MultilineHashBraceLayout:
Layout/MultilineMethodCallBraceLayout:
Layout/MultilineMethodCallIndentation:
Layout/MultilineMethodDefinitionBraceLayout:
Layout/MultilineOperationIndentation:
Layout/RescueEnsureAlignment:
Layout/SpaceAfterColon:
Layout/SpaceAfterComma:
Layout/SpaceAfterMethodName:
Layout/SpaceAfterNot:
Layout/SpaceAfterSemicolon:
Layout/SpaceAroundBlockParameters:
Layout/SpaceAroundEqualsInParameterDefault:
Layout/SpaceAroundKeyword:
Layout/SpaceAroundOperators:
Layout/SpaceBeforeBlockBraces:
Layout/SpaceBeforeComma:
Layout/SpaceBeforeComment:
Layout/SpaceBeforeFirstArg:
Layout/SpaceBeforeSemicolon:
Layout/SpaceInLambdaLiteral:
Layout/SpaceInsideArrayPercentLiteral:
Layout/SpaceInsideBlockBraces:
Layout/SpaceInsideBrackets:
Layout/SpaceInsideHashLiteralBraces:
Layout/SpaceInsideParens:
Layout/SpaceInsidePercentLiteralDelimiters:
Layout/SpaceInsideRangeLiteral:
Layout/SpaceInsideStringInterpolation:
Layout/Tab:
Layout/TrailingBlankLines:
Layout/TrailingWhitespace:
Lint/BlockAlignment:
Lint/DefEndAlignment:
Lint/DeprecatedClassMethods:
Lint/EmptyInterpolation:
Lint/LiteralInInterpolation:
Lint/MultipleCompare:
Lint/PercentStringArray:
Lint/PercentSymbolArray:
Lint/RescueType:
Lint/SafeNavigationChain:
Lint/StringConversionInInterpolation:
Lint/UnifiedInteger:
Lint/UnneededSplatExpansion:
Lint/UnusedBlockArgument:
Lint/UnusedMethodArgument:
Performance/CaseWhenSplat:
Performance/Casecmp:
Performance/CompareWithBlock:
Performance/Count:
Performance/Detect:
Performance/DoubleStartEndWith:
Performance/FlatMap:
Performance/LstripRstrip:
Performance/RangeInclude:
Performance/RedundantBlockCall:
Performance/RedundantMatch:
Performance/RedundantMerge:
Performance/RedundantSortBy:
Performance/RegexpMatch:
Performance/ReverseEach:
Performance/Sample:
Performance/Size:
Performance/StartWith:
Performance/StringReplacement:
Performance/TimesMap:
RSpec/BeEql:
RSpec/DescribedClass:
RSpec/EmptyLineAfterFinalLet:
RSpec/EmptyLineAfterSubject:
RSpec/ExampleWording:
RSpec/HookArgument:
RSpec/ImplicitExpect:
RSpec/InstanceSpy:
RSpec/ItBehavesLike:
RSpec/LeadingSubject:
RSpec/NotToNot:
RSpec/SharedContext:
RSpec/SingleArgumentMessageChain:
Security/JSONLoad:
Security/YAMLLoad:
Style/Alias:
Style/AndOr:
Style/ArrayJoin:
Style/Attr:
Style/BarePercentLiterals:
Style/BlockComments:
Style/BlockDelimiters:
Style/BracesAroundHashParameters:
Style/CharacterLiteral:
Style/ClassCheck:
Style/ClassMethods:
Style/CollectionMethods:
Style/ColonMethodCall:
Style/CommandLiteral:
Style/CommentAnnotation:
Style/ConditionalAssignment:
Style/DefWithParentheses:
Style/EachForSimpleLoop:
Style/EachWithObject:
Style/EmptyCaseCondition:
Style/EmptyElse:
Style/EmptyLiteral:
Style/EmptyMethod:
Style/EvenOdd:
Style/FormatString:
Style/FrozenStringLiteralComment:
Style/HashSyntax:
Style/InfiniteLoop:
Style/InverseMethods:
Style/Lambda:
Style/LambdaCall:
Style/LineEndConcatenation:
Style/MethodCallWithoutArgsParentheses:
Style/MethodDefParentheses:
Style/MixinGrouping:
Style/MultilineIfThen:
Style/MultilineMemoization:
Style/MutableConstant:
Style/NegatedIf:
Style/NegatedWhile:
Style/NestedModifier:
Style/NestedParenthesizedCalls:
Style/Next:
Style/NilComparison:
Style/NonNilCheck:
Style/Not:
Style/NumericLiteralPrefix:
Style/NumericLiterals:
Style/OneLineConditional:
Style/ParallelAssignment:
Style/ParenthesesAroundCondition:
Style/PercentLiteralDelimiters:
Style/PercentQLiterals:
Style/PerlBackrefs:
Style/PreferredHashMethods:
Style/Proc:
Style/RaiseArgs:
Style/RedundantBegin:
Style/RedundantException:
Style/RedundantFreeze:
Style/RedundantParentheses:
Style/RedundantReturn:
Style/RedundantSelf:
Style/RegexpLiteral:
Style/RescueModifier:
Style/SafeNavigation:
Style/Semicolon:
Style/SignalException:
Style/SingleLineMethods:
Style/SpecialGlobalVars:
Style/StabbyLambdaParentheses:
Style/StringLiterals:
Style/StringLiteralsInInterpolation:
Style/StringMethods:
Style/SymbolArray:
Style/SymbolLiteral:
Style/TernaryParentheses:
Style/TrailingCommaInArguments:
Style/TrailingCommaInLiteral:
Style/TrailingUnderscoreVariable:
Style/TrivialAccessors:
Style/UnlessElse:
Style/UnneededCapitalW:
Style/UnneededInterpolation:
Style/UnneededPercentQ:
Style/VariableInterpolation:
Style/WhenThen:
Style/WhileUntilDo:
Style/WhileUntilModifier:
Style/WordArray:
EnforcedStyle: brackets
Style/YodaCondition:
Style/ZeroLengthPredicate:
profiles:
# no rubocops enabled, caveat emptor!
off:
enabled_cops: {}
# a sanitized list of cops that'll cleanup a code base without much effort
# they all support autocorrect, and should be fairly uncontroversial across
# wide segments of the Community.
cleanups_only:
configs: *default_configs
enabled_cops: *cleanup_cops
# a good mix of cops with community recommended settings
strict:
configs: *default_configs
enabled_cops:
<<: *cleanup_cops
Bundler/DuplicatedGem:
Layout/EmptyLinesAroundBeginBody:
Lint/AmbiguousBlockAssociation:
Lint/AmbiguousOperator:
Lint/AmbiguousRegexpLiteral:
Lint/AssignmentInCondition:
Lint/CircularArgumentReference:
Lint/ConditionPosition:
Lint/Debugger:
Lint/DuplicateCaseCondition:
Lint/DuplicateMethods:
Lint/DuplicatedKey:
Lint/EachWithObjectArgument:
Lint/ElseLayout:
Lint/EmptyEnsure:
Lint/EmptyExpression:
Lint/EmptyWhen:
Lint/EndAlignment:
Lint/EndInMethod:
Lint/EnsureReturn:
Lint/FloatOutOfRange:
Lint/FormatParameterMismatch:
Lint/HandleExceptions:
Lint/ImplicitStringConcatenation:
Lint/IneffectiveAccessModifier:
Lint/InheritException:
Lint/InvalidCharacterLiteral:
Lint/LiteralInCondition:
Lint/Loop:
Lint/NestedMethodDefinition:
Lint/NextWithoutAccumulator:
Lint/NonLocalExitFromIterator:
Lint/ParenthesesAsGroupedExpression:
Lint/RandOne:
Lint/RequireParentheses:
Lint/RescueException:
Lint/ScriptPermission:
Lint/ShadowedException:
Lint/ShadowingOuterLocalVariable:
Lint/UnderscorePrefixedVariableName:
Lint/UnneededDisable:
Lint/UnreachableCode:
Lint/UselessAccessModifier:
Lint/UselessAssignment:
Lint/UselessComparison:
Lint/UselessElseWithoutRescue:
Lint/UselessSetterCall:
Lint/Void:
Metrics/BlockNesting:
Metrics/LineLength:
Performance/Caller:
Performance/EndWith:
Performance/FixedSize:
Performance/HashEachMethods:
RSpec/AnyInstance:
RSpec/AroundBlock:
RSpec/BeforeAfterAll:
RSpec/DescribeMethod:
RSpec/DescribeSymbol:
RSpec/EmptyExampleGroup:
RSpec/ExpectActual:
RSpec/ExpectOutput:
RSpec/FilePath:
RSpec/Focus:
RSpec/InstanceVariable:
RSpec/IteratedExpectation:
RSpec/LetSetup:
RSpec/MessageChain:
RSpec/MessageSpies:
EnforcedStyle: receive
RSpec/MultipleDescribes:
RSpec/NamedSubject:
RSpec/OverwritingSetup:
RSpec/RepeatedDescription:
RSpec/RepeatedExample:
RSpec/ScatteredLet:
RSpec/ScatteredSetup:
RSpec/SubjectStub:
RSpec/VerifiedDoubles:
Security/Eval:
Security/MarshalLoad:
Style/AccessorMethodName:
Style/AsciiIdentifiers:
Style/BeginBlock:
Style/CaseEquality:
Style/ClassAndModuleCamelCase:
Style/ClassAndModuleChildren:
Style/ClassVars:
Style/ConstantName:
Style/Documentation:
Exclude:
- 'lib/puppet/parser/functions/**/*'
- 'spec/**/*'
Style/DoubleNegation:
Style/EndBlock:
Style/FileName:
Style/FlipFlop:
Style/For:
Style/FormatStringToken:
Style/GlobalVars:
Style/GuardClause:
Style/IdenticalConditionalBranches:
Style/IfInsideElse:
Style/IfUnlessModifierOfIfUnless:
Style/IfWithSemicolon:
Style/MethodCalledOnDoEndBlock:
Style/MethodMissing:
Style/MethodName:
Style/ModuleFunction:
Style/MultilineBlockChain:
Style/MultilineIfModifier:
Style/MultilineTernaryOperator:
Style/MultipleComparison:
Style/NestedTernaryOperator:
Style/NumericPredicate:
Style/OpMethod:
Style/OptionalArguments:
Style/PredicateName:
Style/SelfAssignment:
Style/StructInheritance:
Style/VariableName:
Style/VariableNumber:
# Uses rubocop default cops
hardcore:
configs: *default_configs
enabled_cops: all
Gemfile:
required:
':development':
- gem: fast_gettext
version: '1.1.0'
condition: "Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.1.0')"
- gem: fast_gettext
condition: "Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.1.0')"
# json_pure 2.0.2 added a requirement on ruby >= 2. We pin to
# json_pure <= 2.0.1 if using ruby 1.x
- gem: json_pure
version: '<= 2.0.1'
condition: "Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0')"
# hardcode JSON version to what's shipped in pdk for now
- gem: json
version: '= 1.8.1'
condition: "Gem::Version.new(RUBY_VERSION.dup) == Gem::Version.new('2.1.9')"
- gem: json
version: '<= 2.0.4'
condition: "Gem::Version.new(RUBY_VERSION.dup) == Gem::Version.new('2.4.4')"
- gem: 'puppet-module-posix-default-r#{minor_version}'
platforms: ruby
- gem: 'puppet-module-posix-dev-r#{minor_version}'
platforms: ruby
- gem: 'puppet-module-win-default-r#{minor_version}'
platforms:
- mswin
- mingw
- x64_mingw
- gem: 'puppet-module-win-dev-r#{minor_version}'
platforms:
- mswin
- mingw
- x64_mingw
# ':system_tests':
# - gem: 'puppet-module-posix-system-r#{minor_version}'
# platforms: ruby
# - gem: 'puppet-module-win-system-r#{minor_version}'
# platforms:
# - mswin
# - mingw
# - x64_mingw
# - gem: beaker
# version: '~> 3.13'
# from_env: BEAKER_VERSION
# - gem: beaker-abs
# from_env: BEAKER_ABS_VERSION
# version: '~> 0.1'
# - gem: beaker-pe
# - gem: beaker-hostgenerator
# from_env: BEAKER_HOSTGENERATOR_VERSION
# - gem: beaker-rspec
# from_env: BEAKER_RSPEC_VERSION
.gitlab-ci.yml:
defaults:
cache:
paths:
- 'vendor/bundle'
bundler_args: '--without system_tests --path vendor/bundle --jobs $(nproc)'
ruby_versions:
'2.1.9':
checks:
- parallel_spec
puppet_version: '~> 4.0'
'2.4.4':
checks:
- 'syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop'
- parallel_spec
puppet_version: '~> 5.5'
# beaker: true
spec/default_facts.yml:
concat_basedir: "/tmp"
ipaddress: "172.16.254.254"
is_pe: false
macaddress: "AA:AA:AA:AA:AA:AA"
spec/spec_helper.rb:
strict_level: ":warning"