From c0e2731a14de8f7241f15c41e02235caf69f12fe Mon Sep 17 00:00:00 2001
From: Magnus Svensson <magnus@ctrl-c.liu.se>
Date: Tue, 26 Oct 2021 13:42:20 +0200
Subject: [PATCH] PDK update

---
 .editorconfig           | 36 +++++++++++++++++++++++++++---------
 .gitattributes          |  8 ++++++++
 .gitignore              |  1 +
 .pdkignore              |  2 ++
 .vscode/extensions.json |  3 ++-
 Gemfile                 |  8 ++++----
 metadata.json           |  4 ++--
 pdk.yaml                |  2 ++
 spec/spec_helper.rb     | 12 ++++++++++++
 9 files changed, 60 insertions(+), 16 deletions(-)
 create mode 100644 pdk.yaml

diff --git a/.editorconfig b/.editorconfig
index 8da4715..6e1faa7 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -1,20 +1,38 @@
-# EditorConfig is awesome: https://EditorConfig.org
+; EditorConfig is awesome: https://EditorConfig.org
 
-# top-most EditorConfig file
+;top-most EditorConfig file
 root = true
 
-# Unix-style newlines with a newline ending every file
+; Ruby style as default
+; UTF-8 charset
+; Unix-style newlines with a newline ending every file
+; 2 space indent
+; Trim trailing whitespace
 [*]
-end_of_line = lf
-insert_final_newline = true
-trim_trailing_whitespace = true
-charset = utf-8
 indent_style = space
 indent_size = 2
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+; Markdown
+; 4 space indent
+; Trailing whitespace is potentially meaningful, leave it
+[*.md]
+indent_size = 4
+trim_trailing_whitespace = false
 
-# The JSON files contain newlines inconsistently
+; Shell scripts & Python
+; 4 space indent
+[*.{sh,py}]
+indent_size = 4
+
+[Makefile]
+indent_style = tab
+
+; The JSON files contain newlines inconsistently
 [*.json]
-indent_size = 2
 insert_final_newline = ignore
 
 [*.{ps1,psm1}]
diff --git a/.gitattributes b/.gitattributes
index 9032a01..77515d7 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -3,3 +3,11 @@
 *.pp eol=lf
 *.sh eol=lf
 *.epp eol=lf
+.editorconfig eol=lf
+.gitattributes eol=lf
+.gitignore eol=lf
+.gitlab-ci.yml eol=lf
+.pdkignore eol=lf
+.vscode/* eol=lf
+Gemfile eol=lf
+metadata.json eol=lf
diff --git a/.gitignore b/.gitignore
index 4c4fe74..a996532 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,6 +25,7 @@
 .project
 .envrc
 /inventory.yaml
+/spec/fixtures/litmus_inventory.yaml
 *~
 \#*\#
 .\#*
diff --git a/.pdkignore b/.pdkignore
index 3c05993..f962996 100644
--- a/.pdkignore
+++ b/.pdkignore
@@ -25,10 +25,12 @@
 .project
 .envrc
 /inventory.yaml
+/spec/fixtures/litmus_inventory.yaml
 *~
 \#*\#
 .\#*
 /appveyor.yml
+/.editorconfig
 /.fixtures.yml
 /Gemfile
 /.gitattributes
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
index 24650e5..a5f6a2b 100644
--- a/.vscode/extensions.json
+++ b/.vscode/extensions.json
@@ -3,6 +3,7 @@
     "puppet.puppet-vscode",
     "rebornix.Ruby",
     "ms-vscode.powershell",
-    "EditorConfig.EditorConfig"
+    "EditorConfig.EditorConfig",
+    "glenbuktenica.unicode-substitutions"
   ]
 }
diff --git a/Gemfile b/Gemfile
index 581f5d7..18272fd 100644
--- a/Gemfile
+++ b/Gemfile
@@ -24,13 +24,13 @@ group :development do
   gem "puppet-module-posix-dev-r#{minor_version}", '~> 1.0',     require: false, platforms: [:ruby]
   gem "puppet-module-win-default-r#{minor_version}", '~> 1.0',   require: false, platforms: [:mswin, :mingw, :x64_mingw]
   gem "puppet-module-win-dev-r#{minor_version}", '~> 1.0',       require: false, platforms: [:mswin, :mingw, :x64_mingw]
-  gem "puppet-lint-absolute_classname-check", '3.0.0',           require: false
+  gem "puppet-lint-absolute_classname-check", '3.0.1',           require: false
   gem "puppet-lint-absolute_template_path", '1.0.1',             require: false
   gem "puppet-lint-empty_trailing_lines", '0.0.1',               require: false
-  gem "puppet-lint-file_ensure-check", '0.3.1',                  require: false
-  gem "puppet-lint-strict_indent-check", '2.0.7',                require: false
+  gem "puppet-lint-file_ensure-check", '1.0.0',                  require: false
+  gem "puppet-lint-strict_indent-check", '2.0.8',                require: false
   gem "puppet-lint-trailing_comma-check", '0.4.2',               require: false
-  gem "puppet-lint-unquoted_string-check", '2.0.0',              require: false
+  gem "puppet-lint-unquoted_string-check", '2.1.0',              require: false
 end
 group :system_tests do
   gem "puppet-module-posix-system-r#{minor_version}", '~> 1.0', require: false, platforms: [:ruby]
diff --git a/metadata.json b/metadata.json
index d7bee83..5356f1f 100644
--- a/metadata.json
+++ b/metadata.json
@@ -64,7 +64,7 @@
       "version_requirement": ">= 5.5.10 < 6.0.0"
     }
   ],
-  "pdk-version": "2.1.0",
+  "pdk-version": "2.2.0",
   "template-url": "https://gitlab.it.liu.se/puppet-infra/pdk-templates.git#liu",
-  "template-ref": "heads/liu-0-g8fb0f81"
+  "template-ref": "heads/liu-0-gd8925d4"
 }
diff --git a/pdk.yaml b/pdk.yaml
new file mode 100644
index 0000000..4bef4bd
--- /dev/null
+++ b/pdk.yaml
@@ -0,0 +1,2 @@
+---
+ignore: []
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index c4cb9ef..ee9e003 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -51,6 +51,18 @@ RSpec.configure do |c|
   c.after(:suite) do
     RSpec::Puppet::Coverage.report!(0)
   end
+
+  # Filter backtrace noise
+  backtrace_exclusion_patterns = [
+    %r{spec_helper},
+    %r{gems},
+  ]
+
+  if c.respond_to?(:backtrace_exclusion_patterns)
+    c.backtrace_exclusion_patterns = backtrace_exclusion_patterns
+  elsif c.respond_to?(:backtrace_clean_patterns)
+    c.backtrace_clean_patterns = backtrace_exclusion_patterns
+  end
 end
 
 # Ensures that a module is defined
-- 
GitLab