Since PE 6.0.0 we've found that pdk validate (also puppet parser) fails in validating a module if smoke tests exist in ..modules/<modname>/examples/ even though that examples directory is still created with 'pdk new module'
[root@1903nix0 review]# pdk validate
pdk (INFO): Running all available validators...
pdk (INFO): Using Ruby 2.5.1
pdk (INFO): Using Puppet 6.0.2
[✔] Checking metadata syntax (metadata.json tasks/*.json).
[✔] Checking module metadata style (metadata.json).
[✖] Checking Puppet manifest syntax (*/*.pp).
[✔] Checking Ruby code style (*/*.rb).
Error: puppet-syntax: this location (file: /opt/puppetlabs/puppet/modules/review/examples/init.pp, line: 1, column: 1): Could not parse for environment production: This Function Call is unacceptable as a top level construct
info: task-name: ./: Target does not contain any files to validate (tasks/*/).
info: task-metadata-lint: ./: Target does not contain any files to validate (tasks/*.json)
Syntax checking improvements in
PUP-4242 seem to have ignored this testing use case. Can we fix this so that the validator won't fail when smoke tests are being used in the customary/default fashion (examples dir)?