[Pkg-puppet-devel] Bug#892069: puppet-lint: rake task only runs lint on modules inside spec/fixtures

Gabriel Filion gabster at lelutin.ca
Sun Mar 4 22:03:00 UTC 2018


Package: puppet-lint
Version: 2.3.3-1
Severity: normal

Hello!

I was trying to use puppet-lint from this package to run lint as a rake
task to automate tests, and I found out that it would only run the lint
checks on .pp files inside modules present in spec/fixtures/modules/*

If I set the task's configuration to ignore some paths, it does not
change anything. In my Rakefile I have:

    require 'puppet-lint/tasks/puppet-lint'
    PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "vendor/**/*.pp", "pkg/**/*.pp"]


I've found out that configuration being ignored was already reported
upstream:

https://github.com/rodjek/puppet-lint/commit/0f2e2db90d5a14382eafbdfebff74048a487372f

However, the fix in that commit is already present in the code deployed
by the debian package.

If I use the workaround proposed as a comment on that commit (instead of
the above line starting with "PuppetLint.configuration"), then the lint
checks run as expected with the ignored paths set as I want them:

    Rake::Task[:lint].clear
    PuppetLint::RakeTask.new :lint do |config|
      config.ignore_paths = ["spec/**/*.pp", "vendor/**/*.pp", "pkg/**/*.pp"]
    end

So there must be something in the puppet-lint code that that makes it
ignore configuration set in the Rakefile, but I'm not proficient enough
in ruby to debug where this is happening.

Cheers

-- System Information:
Debian Release: buster/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.14.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_CA.utf8, LC_CTYPE=en_CA.utf8 (charmap=UTF-8) (ignored: LC_ALL set to en_CA.utf8), LANGUAGE=en_CA.utf8 (charmap=UTF-8) (ignored: LC_ALL set to en_CA.utf8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages puppet-lint depends on:
ii  ruby  1:2.5~1

puppet-lint recommends no packages.

Versions of packages puppet-lint suggests:
ii  rake  12.3.0-1

-- no debconf information



More information about the Pkg-puppet-devel mailing list