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

2.3.1: puppet-lint does not show errors/warnings --error-level option. #756

Closed
zekefast opened this issue Sep 27, 2017 · 8 comments
Closed

Comments

@zekefast
Copy link
Contributor

Environment

  • puppet-lint: 2.3.1
  • Shell:
    $ LANG=C bash --version
    GNU bash, version 4.4.12(1)-release (x86_64-pc-linux-gnu)
    Copyright (C) 2016 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    
    This is free software; you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.
    
  • Operation System: Debian GNU/Linux 9.1 (stretch)
  • Kernel: 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u5 (2017-09-19) x86_64 GNU/Linux

Actual behaviour

$ bundle exec puppet-lint --error-level all manifests/nginx.pp

No output at all, but set status to 1 when launched with --fail-on-warnings option.

Expected behaviour

It should display errors and warnings in file.

For example, like follows:

$ bundle exec puppet-lint --error-level all manifests/nginx.pp
WARNING: indentation of => is not properly aligned (expected in column 13, but found it in column 12) on line 19

Steps to reproduce

Run puppet-lint on puppet file with misaligned class properties.

file "/tmp/example" {
  ensure => 'present'
  force => true
}

Correct version of this file will be

file "/tmp/example" {
  ensure => 'present'
  force  => true
}
@patrickconant
Copy link

I ran into this too after updating to 2.3.1 on MacOS High Sierra. I can't tell whether there are actually lint issues in our puppet manifests, or if --fail-on-warnings is just causing a return code of 1 regardless of whether there are issues or not. My guess is that there are issues (since I can get a return code of 0 if I alter the input file list), but with no text output from the puppet-lint command I can't tell what the issues might be.

@cyberious
Copy link

Just ran into this as well, all my CI systems are failing as a result.

@farkasmate
Copy link

It breaks the Puppet Development Kit as puppetlabs_spec_helper installs the latest version.

All the printing seems to be broken.

# puppet-lint --version
puppet-lint: no file specified
puppet-lint: try 'puppet-lint --help' for more information

@rnelson0
Copy link
Collaborator

This appears related to #754 which should be addressed in 2.3.2 (#755 and #758), can you confirm?

@farkasmate
Copy link

It works, thank you.

# puppet-lint --version
puppet-lint 2.3.2

Also printing all the issues.

@patrickconant
Copy link

Confirmed, works on MacOS too. Thank you.

@rnelson0
Copy link
Collaborator

Thanks for confirmation!

@zekefast
Copy link
Contributor Author

@farkasmate I also noticed that problem with puppet-lint --version, but 2.3.2 fixed it.

On 2.3.1:

$ puppet-lint --version
puppet-lint: no file specified
puppet-lint: try 'puppet-lint --help' for more information

On 2.3.2:

$ puppet-lint --version
puppet-lint 2.3.2

rodjek added a commit that referenced this issue Sep 28, 2017
rodjek added a commit that referenced this issue Sep 28, 2017
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

6 participants