From 055444008e70326f3ef8737b38e5e0ef1f1016e0 Mon Sep 17 00:00:00 2001 From: Robert Waffen Date: Mon, 2 Sep 2024 10:40:09 +0200 Subject: [PATCH 1/2] feat: re-enable by puppetlabs disabled puppet-lint checks Signed-off-by: Robert Waffen --- README.md | 7 ++++--- voxbox/Rakefile | 24 ++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 37b6526..b0c5a97 100644 --- a/README.md +++ b/README.md @@ -67,14 +67,14 @@ rake module:bump_to_version[new_version] rake module:clean # Runs clean again rake module:dependency[module_name,version] # Set specific module dependency version rake module:push # Push module to the Puppet Forge -rake module:release # Release the Puppet module, doing a clean, build, bump_commit, tag, push and git push +rake module:release # Release the Puppet module, doing a clean, build, bump_commit... rake module:tag # Git tag with the current module version rake module:version # Get current module version rake module:version:next # Get next module version rake module:version:next:major # Get the next MAJOR version rake module:version:next:minor # Get the next MINOR version rake module:version:next:patch # Get the next PATCH version -rake parallel_spec # Run spec tests in parallel and clean the fixtures directory if successful +rake parallel_spec # Run spec tests in parallel and clean the fixtures directory ... rake parallel_spec_standalone # Parallel spec tests rake r10k:dependencies # Print outdated forge modules rake r10k:deprecation # Validate that no forge modules are deprecated @@ -86,7 +86,7 @@ rake r10k:syntax rake r10k:validate # Validate the git urls and branches, refs, or tags rake release # Release via GitHub Actions rake release:prepare # Prepare a release -rake release_checks # Runs all necessary checks on a module in preparation for a release +rake release_checks # Runs all necessary checks on a module in preparation for a r... rake rubocop # Run RuboCop rake rubocop:autocorrect # Autocorrect RuboCop offenses (only when it's safe) rake rubocop:autocorrect_all # Autocorrect RuboCop offenses (safe and unsafe) @@ -108,6 +108,7 @@ rake syntax:templates rake test # Run tests rake travis_release # Deprecated: use the "release" task instead rake validate # Check syntax of Ruby files and call :syntax and :metadata_lint +rake voxpupuli:custom:lint_all # Lint with all puppet-lint checks ``` ## Additionally included Tools diff --git a/voxbox/Rakefile b/voxbox/Rakefile index 58c2cc8..db972f7 100644 --- a/voxbox/Rakefile +++ b/voxbox/Rakefile @@ -4,3 +4,27 @@ require 'voxpupuli/release/rake_tasks' require 'ra10ke' Ra10ke::RakeTask.new + +namespace :voxpupuli do + namespace :custom do + desc 'Lint with all puppet-lint checks' + task :lint_all do + # re-enable by puppetlabs disabled checks from puppetlabs/spec_helper + # see: https://github.com/puppetlabs/puppetlabs_spec_helper/blob/70de49db0a242f83e9ff39ea8a03c830339f8368/lib/puppetlabs_spec_helper/rake_tasks.rb#L169-L177 + puppet_lint_enable_checks = %w[ + 140chars + class_inherits_from_params_class + class_parameter_defaults + autoloader_layout + documentation + single_quote_string_with_variables + ] + + puppet_lint_enable_checks.each do |check| + PuppetLint.configuration.send(:"enable_#{check}") + end + + Rake::Task[:lint].invoke + end + end +end From a9a7aa8212462336fbad85d31768edfea79f2141 Mon Sep 17 00:00:00 2001 From: Robert Waffen Date: Fri, 6 Sep 2024 10:27:20 +0200 Subject: [PATCH 2/2] fix: repair broken rake task list Signed-off-by: Robert Waffen --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b0c5a97..2dc9f8e 100644 --- a/README.md +++ b/README.md @@ -67,14 +67,14 @@ rake module:bump_to_version[new_version] rake module:clean # Runs clean again rake module:dependency[module_name,version] # Set specific module dependency version rake module:push # Push module to the Puppet Forge -rake module:release # Release the Puppet module, doing a clean, build, bump_commit... +rake module:release # Release the Puppet module, doing a clean, build, bump_commit, tag, push and git push rake module:tag # Git tag with the current module version rake module:version # Get current module version rake module:version:next # Get next module version rake module:version:next:major # Get the next MAJOR version rake module:version:next:minor # Get the next MINOR version rake module:version:next:patch # Get the next PATCH version -rake parallel_spec # Run spec tests in parallel and clean the fixtures directory ... +rake parallel_spec # Run spec tests in parallel and clean the fixtures directory if successful rake parallel_spec_standalone # Parallel spec tests rake r10k:dependencies # Print outdated forge modules rake r10k:deprecation # Validate that no forge modules are deprecated @@ -86,7 +86,7 @@ rake r10k:syntax rake r10k:validate # Validate the git urls and branches, refs, or tags rake release # Release via GitHub Actions rake release:prepare # Prepare a release -rake release_checks # Runs all necessary checks on a module in preparation for a r... +rake release_checks # Runs all necessary checks on a module in preparation for a release rake rubocop # Run RuboCop rake rubocop:autocorrect # Autocorrect RuboCop offenses (only when it's safe) rake rubocop:autocorrect_all # Autocorrect RuboCop offenses (safe and unsafe)