Skip to content
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

Rubocop and Puppet <= 3.8.0 #131

Open
spacepants opened this issue Oct 4, 2016 · 0 comments
Open

Rubocop and Puppet <= 3.8.0 #131

spacepants opened this issue Oct 4, 2016 · 0 comments

Comments

@spacepants
Copy link
Contributor

Hey there,

The current gemset in the skeleton breaks Rubocop integration.

When using Rubocop 0.33.0 with any Puppet version, Rubocop fails with invalid option: -E.

Updating Rubocop to the latest 0.43.0 fails due to puppet's safe_yaml monkey patch which redefines the method with an arity of 3, while Rubocop's expecting it to have 5.

Right now as a workaround, I'm updating Rubocop to 0.43.0 and dropping rubocop from the test task if the Puppet version is <= 3.8 like so:

test_tasks = [ 
  :metadata_lint, 
  :syntax, 
  :lint, 
  :rubocop, 
  :spec, 
] 

if Puppet.version.to_f <= 3.8 
  test_tasks.delete(:rubocop) 
end 
desc "Run syntax, lint, and spec tests." 
task :test => test_tasks 

Is there a better approach I should be trying in order to fix things like test matrixes for Travis tests? I'm assuming that long-term the skeleton will eventually be updated to default to Puppet 4, but I'm not sure how far off that is.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant