mschuchard / puppet-check Goto Github PK
View Code? Open in Web Editor NEWA streamlined comprehensive set of checks for your entire Puppet code and data
License: MIT License
A streamlined comprehensive set of checks for your entire Puppet code and data
License: MIT License
Hi, first of all a big thank you for this very useful gem. I have used this within my environment but I get an error trying to perform a puppetcheck with style checks enabled.
When I run rake puppetcheck:file
I get the following error:
rake aborted!
LoadError: cannot load such file -- reek
While I do have the reek gem installed.
This is the content of my Rakefile:
require 'puppet-check/tasks'
PuppetCheck.style_check = true
ruby: 2.1.8
puppet-check: 1.1.0
puppet-lint: 1.1.0
reek: 4.0.3
This problem doesn't occur when I run puppet-check -s .
Any idea on how to solve this?
I've got a hiera yaml file that is empty (i.e: no yaml in it). puppet-check borks parsing it:
vendor/bundle/ruby/2.3.0/gems/puppet-check-1.0.0/lib/puppet-check/data_parser.rb:90:in `hiera': undefined method `each' for false:FalseClass (NoMethodError)
from vendor/bundle/ruby/2.3.0/gems/puppet-check-1.0.0/lib/puppet-check/data_parser.rb:16:in `block in yaml'
from vendor/bundle/ruby/2.3.0/gems/puppet-check-1.0.0/lib/puppet-check/data_parser.rb:9:in `each'
from vendor/bundle/ruby/2.3.0/gems/puppet-check-1.0.0/lib/puppet-check/data_parser.rb:9:in `yaml'
from vendor/bundle/ruby/2.3.0/gems/puppet-check-1.0.0/lib/puppet-check.rb:70:in `execute_parsers'
from vendor/bundle/ruby/2.3.0/gems/puppet-check-1.0.0/lib/puppet-check.rb:32:in `run'
from vendor/bundle/ruby/2.3.0/gems/puppet-check-1.0.0/lib/puppet-check/cli.rb:12:in `run'
from vendor/bundle/ruby/2.3.0/gems/puppet-check-1.0.0/bin/puppet-check:5:in `<top (required)>'
from vendor/bundle/ruby/2.3.0/bin/puppet-check:23:in `load'
from vendor/bundle/ruby/2.3.0/bin/puppet-check:23:in `<main>'
In one of our Puppet modules puppet-check
fails with the following errors:
bash-4.3# puppet-check .
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/data_parser.rb:107:in `block (2 levels) in json': undefined method `empty?' for nil:NilClass (NoMethodError)
from /usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/data_parser.rb:105:in `each'
from /usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/data_parser.rb:105:in `block in json'
from /usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/data_parser.rb:34:in `each'
from /usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/data_parser.rb:34:in `json'
from /usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check.rb:78:in `execute_parsers'
from /usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check.rb:36:in `run'
from /usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/cli.rb:13:in `run'
from /usr/local/bundle/gems/puppet-check-1.3.2/bin/puppet-check:5:in `<top (required)>'
from /usr/local/bundle/bin/puppet-check:22:in `load'
from /usr/local/bundle/bin/puppet-check:22:in `<main>'
or
bash-4.3# puppet-check --style .
wrong number of arguments (5 for 1..3)
/usr/local/bundle/gems/puppet-3.8.7/lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb:162:in `safe_load'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/config_loader.rb:171:in `yaml_safe_load'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/config_loader.rb:154:in `load_yaml_configuration'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/config_loader.rb:34:in `load_file'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/config_loader.rb:107:in `configuration_from_file'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/config_store.rb:44:in `for'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/runner.rb:163:in `cached_run?'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/runner.rb:59:in `ensure in inspect_files'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/runner.rb:61:in `inspect_files'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/runner.rb:36:in `run'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/cli.rb:72:in `execute_runner'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/cli.rb:27:in `run'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/ruby_parser.rb:21:in `block (2 levels) in ruby'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/utils.rb:7:in `capture_stdout'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/ruby_parser.rb:21:in `block in ruby'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/ruby_parser.rb:8:in `each'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/ruby_parser.rb:8:in `ruby'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check.rb:72:in `execute_parsers'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check.rb:36:in `run'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/cli.rb:13:in `run'
/usr/local/bundle/gems/puppet-check-1.3.2/bin/puppet-check:5:in `<top (required)>'
/usr/local/bundle/bin/puppet-check:22:in `load'
/usr/local/bundle/bin/puppet-check:22:in `<main>'
wrong number of arguments (5 for 1..3)
/usr/local/bundle/gems/puppet-3.8.7/lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb:162:in `safe_load'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/config_loader.rb:171:in `yaml_safe_load'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/config_loader.rb:154:in `load_yaml_configuration'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/config_loader.rb:34:in `load_file'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/config_loader.rb:107:in `configuration_from_file'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/config_store.rb:44:in `for'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/runner.rb:163:in `cached_run?'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/runner.rb:59:in `ensure in inspect_files'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/runner.rb:61:in `inspect_files'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/runner.rb:36:in `run'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/cli.rb:72:in `execute_runner'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/cli.rb:27:in `run'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/ruby_parser.rb:21:in `block (2 levels) in ruby'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/utils.rb:7:in `capture_stdout'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/ruby_parser.rb:21:in `block in ruby'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/ruby_parser.rb:8:in `each'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/ruby_parser.rb:8:in `ruby'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check.rb:72:in `execute_parsers'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check.rb:36:in `run'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/cli.rb:13:in `run'
/usr/local/bundle/gems/puppet-check-1.3.2/bin/puppet-check:5:in `<top (required)>'
/usr/local/bundle/bin/puppet-check:22:in `load'
/usr/local/bundle/bin/puppet-check:22:in `<main>'
wrong number of arguments (5 for 1..3)
/usr/local/bundle/gems/puppet-3.8.7/lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb:162:in `safe_load'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/config_loader.rb:171:in `yaml_safe_load'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/config_loader.rb:154:in `load_yaml_configuration'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/config_loader.rb:34:in `load_file'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/config_loader.rb:107:in `configuration_from_file'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/config_store.rb:44:in `for'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/runner.rb:163:in `cached_run?'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/runner.rb:59:in `ensure in inspect_files'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/runner.rb:61:in `inspect_files'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/runner.rb:36:in `run'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/cli.rb:72:in `execute_runner'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/cli.rb:27:in `run'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/ruby_parser.rb:21:in `block (2 levels) in ruby'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/utils.rb:7:in `capture_stdout'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/ruby_parser.rb:21:in `block in ruby'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/ruby_parser.rb:8:in `each'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/ruby_parser.rb:8:in `ruby'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check.rb:72:in `execute_parsers'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check.rb:36:in `run'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/cli.rb:13:in `run'
/usr/local/bundle/gems/puppet-check-1.3.2/bin/puppet-check:5:in `<top (required)>'
/usr/local/bundle/bin/puppet-check:22:in `load'
/usr/local/bundle/bin/puppet-check:22:in `<main>'
wrong number of arguments (5 for 1..3)
/usr/local/bundle/gems/puppet-3.8.7/lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb:162:in `safe_load'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/config_loader.rb:171:in `yaml_safe_load'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/config_loader.rb:154:in `load_yaml_configuration'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/config_loader.rb:34:in `load_file'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/config_loader.rb:107:in `configuration_from_file'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/config_store.rb:44:in `for'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/runner.rb:163:in `cached_run?'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/runner.rb:59:in `ensure in inspect_files'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/runner.rb:61:in `inspect_files'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/runner.rb:36:in `run'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/cli.rb:72:in `execute_runner'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/cli.rb:27:in `run'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/ruby_parser.rb:21:in `block (2 levels) in ruby'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/utils.rb:7:in `capture_stdout'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/ruby_parser.rb:21:in `block in ruby'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/ruby_parser.rb:8:in `each'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/ruby_parser.rb:8:in `ruby'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check.rb:72:in `execute_parsers'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check.rb:36:in `run'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/cli.rb:13:in `run'
/usr/local/bundle/gems/puppet-check-1.3.2/bin/puppet-check:5:in `<top (required)>'
/usr/local/bundle/bin/puppet-check:22:in `load'
/usr/local/bundle/bin/puppet-check:22:in `<main>'
wrong number of arguments (5 for 1..3)
/usr/local/bundle/gems/puppet-3.8.7/lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb:162:in `safe_load'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/config_loader.rb:171:in `yaml_safe_load'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/config_loader.rb:154:in `load_yaml_configuration'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/config_loader.rb:34:in `load_file'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/config_loader.rb:107:in `configuration_from_file'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/config_store.rb:44:in `for'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/runner.rb:163:in `cached_run?'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/runner.rb:59:in `ensure in inspect_files'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/runner.rb:61:in `inspect_files'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/runner.rb:36:in `run'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/cli.rb:72:in `execute_runner'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/cli.rb:27:in `run'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/ruby_parser.rb:21:in `block (2 levels) in ruby'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/utils.rb:7:in `capture_stdout'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/ruby_parser.rb:21:in `block in ruby'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/ruby_parser.rb:8:in `each'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/ruby_parser.rb:8:in `ruby'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check.rb:72:in `execute_parsers'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check.rb:36:in `run'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/cli.rb:13:in `run'
/usr/local/bundle/gems/puppet-check-1.3.2/bin/puppet-check:5:in `<top (required)>'
/usr/local/bundle/bin/puppet-check:22:in `load'
/usr/local/bundle/bin/puppet-check:22:in `<main>'
wrong number of arguments (5 for 1..3)
/usr/local/bundle/gems/puppet-3.8.7/lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb:162:in `safe_load'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/config_loader.rb:171:in `yaml_safe_load'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/config_loader.rb:154:in `load_yaml_configuration'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/config_loader.rb:34:in `load_file'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/config_loader.rb:107:in `configuration_from_file'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/config_store.rb:44:in `for'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/runner.rb:163:in `cached_run?'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/runner.rb:59:in `ensure in inspect_files'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/runner.rb:61:in `inspect_files'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/runner.rb:36:in `run'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/cli.rb:72:in `execute_runner'
/usr/local/bundle/gems/rubocop-0.47.1/lib/rubocop/cli.rb:27:in `run'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/ruby_parser.rb:21:in `block (2 levels) in ruby'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/utils.rb:7:in `capture_stdout'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/ruby_parser.rb:21:in `block in ruby'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/ruby_parser.rb:8:in `each'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/ruby_parser.rb:8:in `ruby'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check.rb:72:in `execute_parsers'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check.rb:36:in `run'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/cli.rb:13:in `run'
/usr/local/bundle/gems/puppet-check-1.3.2/bin/puppet-check:5:in `<top (required)>'
/usr/local/bundle/bin/puppet-check:22:in `load'
/usr/local/bundle/bin/puppet-check:22:in `<main>'
/usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/data_parser.rb:107:in `block (2 levels) in json': undefined method `empty?' for nil:NilClass (NoMethodError)
from /usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/data_parser.rb:105:in `each'
from /usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/data_parser.rb:105:in `block in json'
from /usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/data_parser.rb:34:in `each'
from /usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/data_parser.rb:34:in `json'
from /usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check.rb:78:in `execute_parsers'
from /usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check.rb:36:in `run'
from /usr/local/bundle/gems/puppet-check-1.3.2/lib/puppet-check/cli.rb:13:in `run'
from /usr/local/bundle/gems/puppet-check-1.3.2/bin/puppet-check:5:in `<top (required)>'
from /usr/local/bundle/bin/puppet-check:22:in `load'
from /usr/local/bundle/bin/puppet-check:22:in `<main>'
We're using the Docker image found under https://hub.docker.com/r/vshn/puppetci/. It brings puppet-check
pre-installed. The source Dockerfile which builds this image is here: https://github.com/vshn/docker-puppetci/blob/master/Dockerfile3
Thanks for your help.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.