On 1/20/16 4:17 PM, Ramin K wrote: > I'm doing some work around distributing a puppet-lint wrapper > internally. Ideally I want a wrapper that reads a custom .puppet-lint.rc > within the repo and the rc file is --only-checks so we can enable new > checks as the codebase is ready to be stricter. > > The problems I'm running into are > > 1. .puppet-lint.rc seems to be additive loading ~/.puppet-lint.rc, > ./.puppet-lint.rc AND --conf path/to/.puppet-lint.rc > > 2. .puppet-lint.rc doesn't support --only-checks syntax > > Has anyone done something similar and did you have to modify optparse.rb > and other Ruby code with puppet-lint to get it to work? > > Ramin >
Hi Ramin, It sounds like you have a repo with a bunch of modules as opposed to one repo per module. Recommend using a script that calls puppet-lint with the arguments that you would like and integrating that into a pre-commit check or a build pipeline. I never use .puppt-lint.rc, instead you would normally have a Rakefile[1] that would configure puppet-lint and run the tests with `rake lint`. See my last post under the subject 'Slightly Off-Topic: CI Test of Puppet module fail' for how to configure it that way. [1] - https://github.com/ghoneycutt/puppet-module-ssh/blob/master/Rakefile Best regards, -g -- Garrett Honeycutt @learnpuppet Puppet Training with LearnPuppet.com Mobile: +1.206.414.8658 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/569FFD3E.4040802%40garretthoneycutt.com. For more options, visit https://groups.google.com/d/optout.
