9

pdk-templates/config_defaults.yml

 3 years ago
source link: https://github.com/puppetlabs/pdk-templates/blob/master/config_defaults.yml
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
master

pdk-templates/config_defaults.yml

Go to file

632 lines (611 sloc) 18.5 KB

--- common: disable_legacy_facts: false .gitattributes: include: '*.rb': 'eol=lf' '*.erb': 'eol=lf' '*.pp': 'eol=lf' '*.sh': 'eol=lf' '*.epp': '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' - '.project' - '.envrc' - '/inventory.yaml' .pdkignore: required: *ignorepaths paths: - '/appveyor.yml' - '/.fixtures.yml' - '/Gemfile' - '/.gitattributes' - '/.gitignore' - '/.gitlab-ci.yml' - '/.pdkignore' - '/Rakefile' - '/rakelib/' - '/.rspec' - '/.rubocop.yml' - '/.travis.yml' - '/.yardopts' - '/spec/' - '/.vscode/' .travis.yml: stages: - static - spec - acceptance ruby_versions: - 2.5.7 bundler_args: --without system_tests docker_sets: docker_defaults: # values will replace @@SET@@ with the docker_sets' value rvm: 2.5.7 sudo: required dist: trusty services: docker bundler_args: --with system_tests env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_PUPPET_COLLECTION=@@COLLECTION@@ BEAKER_set=@@SET@@ BEAKER_TESTMODE=@@TESTMODE@@ script: bundle exec rake beaker stage: acceptance includes: - env: CHECK="check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop syntax lint metadata_lint" stage: static - env: PUPPET_GEM_VERSION="~> 5.0" CHECK=parallel_spec rvm: 2.4.5 stage: spec - env: PUPPET_GEM_VERSION="~> 6.0" CHECK=parallel_spec rvm: 2.5.7 stage: spec branches: - main - /^v\d/ use_litmus: false use_litmus_complex: false litmus: provision_list: [travis_deb, travis_el] puppet_collection: [puppet5, puppet6] rvm: '2.5.7' install_wget: no notifications: email: false deploy_to_forge: enabled: true tag_regex: "^v\\d" .yardopts: markup: markdown appveyor.yml: appveyor_bundle_install: "bundle install --jobs 4 --retry 2 --without system_tests" use_litmus: false 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: ~> 5.0 RUBY_VERSION: 24 CHECK: parallel_spec - PUPPET_GEM_VERSION: ~> 5.0 RUBY_VERSION: 24-x64 CHECK: parallel_spec - PUPPET_GEM_VERSION: ~> 6.0 RUBY_VERSION: 25 CHECK: parallel_spec - PUPPET_GEM_VERSION: ~> 6.0 RUBY_VERSION: 25-x64 CHECK: parallel_spec test_script: - bundle exec rake %CHECK% branches: - main - release Rakefile: changelog_version_tag_pattern: 'v%s' 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

# Disabled i18n cops by default GetText: Enabled: false

# Configure i18n cops for when they are enabled GetText/DecorateString: Description: We don't want to decorate test output. Exclude: - 'spec/**/*'

# 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/BracesAroundHashParameters: Description: Braces are required by Ruby 2.7. Cop removed from RuboCop v0.80.0. See https://github.com/rubocop-hq/rubocop/pull/7643 Enabled: false

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/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::Requirement.create('~> 2.4.2').satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))" - gem: json version: '= 2.1.0' condition: "Gem::Requirement.create(['>= 2.5.0', '< 2.7.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))" - gem: 'rb-readline' version: '= 0.5.5' platforms: - mswin - mingw - x64_mingw - gem: 'puppet-module-posix-default-r#{minor_version}' version: '~> 0.4' platforms: ruby - gem: 'puppet-module-posix-dev-r#{minor_version}' version: '~> 0.4' platforms: ruby - gem: 'puppet-module-win-default-r#{minor_version}' version: '~> 0.4' platforms: - mswin - mingw - x64_mingw - gem: 'puppet-module-win-dev-r#{minor_version}' version: '~> 0.4' platforms: - mswin - mingw - x64_mingw .gitlab-ci.yml: defaults: cache: paths: - 'vendor/bundle' bundler_args: '--without system_tests --path vendor/bundle --jobs $(nproc)' ruby_versions: '2.5.7': checks: - 'syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop' - parallel_spec puppet_version: '~> 6' '2.4.5': checks: - parallel_spec puppet_version: '~> 5' # beaker: true default_before_script: true spec/default_facts.yml: ipaddress: "172.16.254.254" ipaddress6: "FE80:0000:0000:0000:AAAA:AAAA:AAAA" is_pe: false macaddress: "AA:AA:AA:AA:AA:AA" spec/spec_helper.rb: coverage_report: false minimum_code_coverage_percentage: 0 strict_level: ":warning" strict_variables: true


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK