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

(PDK-1202) Pass TemplateDir object through to TemplateFile #605

Merged
merged 1 commit into from
Dec 10, 2018

Conversation

rodjek
Copy link
Contributor

@rodjek rodjek commented Dec 4, 2018

This allows templates to access configuration for other files if they really need to (for example, generating a .puppet-lint.rc from the checks being disabled in the Rakefile). The config for another file can be accessed in the template using the config_for method, e.g.

<%= config_for('Rakefile')['default_lint_disabled_checks'] %>

This allows templates to access configuration for other files if they
really need to (for example, generating a `.puppet-lint.rc` from the
checks being disabled in the Rakefile).
rodjek added a commit to rodjek/pdk-templates that referenced this pull request Dec 4, 2018
Our current documented way of disabling puppet-lint checks is to use
`.sync.yml` to specify a list of checks which is then used when
generating the `lint` task in the `Rakefile`. Unfortunately, while this
does take effect when running the tests in CI, it does not similarly
change the behaviour of `pdk validate` which calls `puppet-lint`
directly instead of using the rake task.

This PR adds a new template for `.puppet-lint.rc` which gets built from
the values specified for the `Rakefile` template. I have deliberately
not added any new config keys specific to this template to reduce the
chance of the puppet-lint configuration from getting out of sync again.

This PR can not be merged until puppetlabs/pdk#605 is merged.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.007%) to 92.814% when pulling de3b9b8 on rodjek:pdk-1202 into 406d6f8 on puppetlabs:master.

@bmjen bmjen merged commit 1991375 into puppetlabs:master Dec 10, 2018
@rodjek rodjek deleted the pdk-1202 branch December 11, 2018 04:44
rodjek added a commit to rodjek/pdk-templates that referenced this pull request Dec 11, 2018
Our current documented way of disabling puppet-lint checks is to use
`.sync.yml` to specify a list of checks which is then used when
generating the `lint` task in the `Rakefile`. Unfortunately, while this
does take effect when running the tests in CI, it does not similarly
change the behaviour of `pdk validate` which calls `puppet-lint`
directly instead of using the rake task.

This PR adds a new template for `.puppet-lint.rc` which gets built from
the values specified for the `Rakefile` template. I have deliberately
not added any new config keys specific to this template to reduce the
chance of the puppet-lint configuration from getting out of sync again.

This PR can not be merged until puppetlabs/pdk#605 is merged.
rodjek added a commit to rodjek/pdk-templates that referenced this pull request Dec 12, 2018
Our current documented way of disabling puppet-lint checks is to use
`.sync.yml` to specify a list of checks which is then used when
generating the `lint` task in the `Rakefile`. Unfortunately, while this
does take effect when running the tests in CI, it does not similarly
change the behaviour of `pdk validate` which calls `puppet-lint`
directly instead of using the rake task.

This PR adds a new template for `.puppet-lint.rc` which gets built from
the values specified for the `Rakefile` template. I have deliberately
not added any new config keys specific to this template to reduce the
chance of the puppet-lint configuration from getting out of sync again.

This PR can not be merged until puppetlabs/pdk#605 is merged.
@chelnak chelnak added the bug label Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants