-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add rubocop config #130
Add rubocop config #130
Conversation
Sounds good to me, but RuboCop is not happy with you |
3d6217c
to
69d21ec
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I opened #137 to fix 2 TODOs.
@ekohl I merged your PR and rebased. |
a30cfe7
to
b10b9f1
Compare
require 'puppetlabs_spec_helper/rake_tasks' | ||
|
||
PuppetLint.configuration.log_format = '%{path}:%{line}:%{check}:%{KIND}:%{message}' | ||
PuppetLint.configuration.log_format = '%<path>s:%<line>s:%<check>s:%<KIND>s:%<message>s' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I honestly don't now if puppet-lint understands this format.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to work fine:
bastelfreak@bastelfreak-nb ~/code/modulesync_config/modules/voxpupuli/puppet-example $ git diff Gemfile manifests/init.pp
diff --git a/Gemfile b/Gemfile
index a4a3b20..3a8a46c 100644
--- a/Gemfile
+++ b/Gemfile
@@ -4,7 +4,8 @@
source ENV['GEM_SOURCE'] || 'https://rubygems.org'
group :test do
- gem 'voxpupuli-test', '~> 7.0', :require => false
+ #gem 'voxpupuli-test', '~> 7.0', :require => false
+ gem 'voxpupuli-test', git: 'https://github.com/bastelfreak/voxpupuli-test', branch: 'rubocop2'
gem 'coveralls', :require => false
gem 'simplecov-console', :require => false
gem 'puppet_metadata', '~> 3.5', :require => false
diff --git a/manifests/init.pp b/manifests/init.pp
index fbf7850..eacd9af 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -1,8 +1,6 @@
# @summary An example class
# @param file
# The file to manage
-# @param content
-# The content in the file
class example (
Stdlib::Absolutepath $file = '/tmp/puppet-example',
String[1] $content = 'Hello World!',
bastelfreak@bastelfreak-nb ~/code/modulesync_config/modules/voxpupuli/puppet-example $
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was asking myself the same (my rubocop plugin wanted to auto fix this every time i opend the file XD) . but if it is tested...
previously this gem only contained a rubocop config that's used in our modules. We didn't run rubocop for the ruby code in this exact gem. This is changed with this commit.
previously this gem only contained a rubocop config that's used in our modules. We didn't run rubocop for the ruby code in this exact gem. This is changed with this commit.