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

Question: using config file, with custom path #466

Closed
jeff1evesque opened this issue Mar 23, 2016 · 2 comments
Closed

Question: using config file, with custom path #466

jeff1evesque opened this issue Mar 23, 2016 · 2 comments

Comments

@jeff1evesque
Copy link

I am currently implementing the following lines within my .travis.yml:

...
install:
  - gem install puppet-lint
...
script:
  - puppet-lint --no-ensure_first_param-check --no-autoloader_layout-check --no-variable_scope-check puppet/environment/development/manifests
  - puppet-lint --no-ensure_first_param-check puppet/environment/development/modules
...

The documentation states:

puppet-lint will also check for a .puppet-lint.rc file in the current directory and your home directory and read in flags from there, so if you wanted to always skip the hard tab character check, you could create ~/.puppet-lint.rc containing

--no-hard_tabs-check

However, I'm curious if I can implement a similar implementation within my .travis.yml, instead of disabling checks inline, within the .travis.yml:

...
script:
  - puppet-lint --config /path/to/.puppet-lint.rc puppet/environment/development/manifests
...

Note: I'm hoping to have /path/to/.puppet-lint.rc not be in the current, or home directory.

@rnelson0
Copy link
Collaborator

@jeff1evesque While you might be able to achieve this locally, it is unlikely Travis CI could be made to find a file outside of your git repo without serious contortions. However, that is not an issue with puppet-lint itself. You may have some success on IRC researching an answer. I suggest you look at using a Gemfile and Rakefile to get started.

@jeff1evesque
Copy link
Author

What about:

...
script:
  - puppet-lint --config /path/to/local/git/repo/custom-directory/.puppet-lint.rc puppet/environment/development/manifests
...

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

2 participants