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

Difference in puppet-lint behavior between pdk validate and rake lint #673

Closed
nabertrand opened this issue May 31, 2019 · 3 comments
Closed

Comments

@nabertrand
Copy link
Contributor

pdk validate runs puppet-lint without any custom configuration, whereas the rake lint task as referenced in the default CI configs (https://github.com/puppetlabs/pdk-templates/blob/c43fc26e5607a038137ba3d7a9cb944eb171330b/config_defaults.yml#L78 and https://github.com/puppetlabs/pdk-templates/blob/c43fc26e5607a038137ba3d7a9cb944eb171330b/config_defaults.yml#L99, for example) disable several checks and exclude several files, as defined in puppetlabs_spec_helper: https://github.com/puppetlabs/puppetlabs_spec_helper/blob/07978467ed536ce1fcc8b2d0dbb830800e06c9b9/lib/puppetlabs_spec_helper/rake_tasks.rb#L172-L192

PuppetLint::RakeTask.new(:lint) do |config|
  config.fail_on_warnings = true
  config.disable_checks = %w[
    80chars
    140chars
    class_inherits_from_params_class
    class_parameter_defaults
    disable_autoloader_layout
    documentation
    single_quote_string_with_variables
  ]
  config.ignore_paths = [
    '.vendor/**/*.pp',
    'bundle/**/*.pp',
    'pkg/**/*.pp',
    'spec/**/*.pp',
    'tests/**/*.pp',
    'types/**/*.pp',
    'vendor/**/*.pp',
  ]
end

I think it would be preferable for the default configuration to match between the two projects maintained by Puppet.

@nabertrand nabertrand added bug needs-triage Newly created issue that has not been reviewed by a PDK contributor labels May 31, 2019
@scotje scotje removed the needs-triage Newly created issue that has not been reviewed by a PDK contributor label Jun 4, 2019
@scotje
Copy link
Contributor

scotje commented Jun 4, 2019

Hi @nabertrand,

Yes we have several related issues here that we need to address to make things more consistent. I will update this issue when we have a JIRA issue you can track or when we have resolved things.

@sanfrancrisko
Copy link
Contributor

This is loosely related to #372 and PDK-709 - we should certainly consider rolling this in to a discussion that encompasses all of that work.

@sanfrancrisko
Copy link
Contributor

I'm closing this ticket and hoping we can continue the conversation on #1069

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants