-
Notifications
You must be signed in to change notification settings - Fork 337
Expand file tree
/
Copy pathRakefile
More file actions
30 lines (27 loc) · 1.81 KB
/
Copy pathRakefile
File metadata and controls
30 lines (27 loc) · 1.81 KB
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
# frozen_string_literal: true
require 'bundler'
require 'puppet_litmus/rake_tasks' if Gem.loaded_specs.key? 'puppet_litmus'
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppetlabs-syntax/tasks/puppetlabs-syntax'
require 'puppet-strings/tasks' if Gem.loaded_specs.key? 'puppet-strings'
PuppetLint.configuration.send('disable_relative')
PuppetLint.configuration.send('disable_80chars')
PuppetLint.configuration.send('disable_140chars')
PuppetLint.configuration.send('disable_class_inherits_from_params_class')
PuppetLint.configuration.send('disable_autoloader_layout')
PuppetLint.configuration.send('disable_documentation')
PuppetLint.configuration.send('disable_single_quote_string_with_variables')
# strict_indent is disabled because its expected indentation changed incompatibly
# between puppet-lint-strict_indent-check 3.x (Puppet 7/8 lane, Ruby 3.1) and 5.x
# (Puppet 9 lane, Ruby 3.4+): the two lanes demand opposite indentation for nested
# hashes, so no single manifest layout can satisfy both. See MODULES-11726 / MODULES-11700.
PuppetLint.configuration.send('disable_strict_indent')
# exec_idempotency and params_not_optional_with_undef are new checks pulled in by
# voxpupuli-puppet-lint-plugins 7.0 (required for the Puppet 9 lane). Both only flag
# intentional code here: the image.pp exec is `~>`-triggered off a notify, the
# services.pp execs are `docker service update`/`scale` (non-idempotent by design),
# and run.pp's `Variant[...,Undef] $net = undef` is equivalent to Optional[...].
PuppetLint.configuration.send('disable_exec_idempotency')
PuppetLint.configuration.send('disable_params_not_optional_with_undef')
PuppetLint.configuration.fail_on_warnings = true
PuppetLint.configuration.ignore_paths = [".vendor/**/*.pp", ".bundle/**/*.pp", "pkg/**/*.pp", "spec/**/*.pp", "tests/**/*.pp", "types/**/*.pp", "vendor/**/*.pp"]