0.0
Repository is archived
No release in over a year
A Gem that provides Rubocop configuration to Puppet Modules and Tools.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

PDK RuboCop

PDK RuboCop is a Gem that provides sane defaults to use when developing Puppet Content.

This gem was inspired by voxpupuli-rubocop

Warning

This tool has not seen proper usage yet as its implementation PR has not been merged. We have no current plans to introduce it in the near future. This tool is no longer officially supported by the DevX team and will not receive any updates in the forseeable future. It will also be archived in the near future.

Usage

In your Gemfile, add the following:

gem 'pdk-rubocop', '~> 0.1'

In your Rakefile, you can include the default Rake task:

require 'pdk/rubocop/rake'

List your rake tasks with bundle exec rake -T

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)

To use the default config, create a .rubocop.yml and add the following:

---
inherit_gem:
  pdk-rubocop: module_rubocop.yml

After adding the inherited config, you may want to regenerate your todo file:

bundle exec rubocop --regenerate-todo