-
Notifications
You must be signed in to change notification settings - Fork 104
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
configuration of file include/exclude patterns for validation #341
Comments
Part of this is tracked in https://tickets.puppetlabs.com/browse/PDK-663 , see also the linked comments there. We definitely want to centralize this configuration. This was buried in the currently scheduled work around https://tickets.puppetlabs.com/browse/PDK-609 , but I've added a separate ticket (https://tickets.puppetlabs.com/browse/PDK-668) to make sure we don't miss it. |
Thanks @DavidS, that's good to hear. I can't access PDK-609, but if I've got this right, it looks like |
I've unlocked PDK-609, that was an "accident". Between the |
Awesome, thanks @DavidS! |
I've started a discussion here for any interested parties wanting to define how we go about implementing a global include/exclude list for all validators in the PDK: #1066 |
(see the rest of #329 for related discussion)
PDK currently uses relatively permissive patterns to build a list of files to scan for validation and supplies them as arguments to the various validators when they are invoked. This works in many cases, but is problematic when a module contains a file with an unexpected extension or when (for better or worse) external code is vendored into a module.
It is possible to configure a specific include pattern when performing
pdk validate
, but this include is shared among all the validators which throw errors when they cannot match their expected file types. See #329 (comment) for an example. This also appeared to trigger an early exit with return code 0 when I tried it.Without PDK, Puppet testing is typically done with a
Rakefile
that contains individual configuration for some of the file patterns forpuppet-lint
andpuppet-syntax
gems while a.rubocop.yml
file is often used to set exclusions for Ruby code. This is a bit complicated, but allows working around any issues of this nature. PDK simplifies the configuration by calling the validation tools directly, but removes the ability to configure the patterns.PDK presents an interesting opportunity to centralize and simplify the include/exclude pattern logic, possibly with a PDK specific configuration file. Is this or any alternatives on the table for a future PDK release?
The text was updated successfully, but these errors were encountered: