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

Don't run puppet-lint check if puppet parser validate fails #75

Open
divansantana opened this issue Apr 11, 2016 · 2 comments
Open

Don't run puppet-lint check if puppet parser validate fails #75

divansantana opened this issue Apr 11, 2016 · 2 comments

Comments

@divansantana
Copy link

Just a suggestion not to run the puppet-lint check if the first check, the puppet parser validate fails.

Two reasons:

  1. In my testing the puppet-lint fails to test properly if the first check (puppet parser validate) fails.
/tmp/puppet-main (working_1 ✔) ᐅ ggp
Counting objects: 4, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 369 bytes | 0 bytes/s, done.
Total 4 (delta 2), reused 1 (delta 0)
remote: Checking puppet manifest syntax for manifests/site.pp...
remote: Error: Could not parse for environment production: Unclosed quote after 'allow_virtual_packages' followed by ',\n  }...' at manifests/site.pp:13:45
remote: Error: puppet syntax error in manifests/site.pp (see above)
remote: Error: 1 syntax error(s) found in puppet manifests. Commit will be aborted.
remote: Checking puppet style guide compliance for manifests/site.pp...
remote: /var/lib/gems/1.9.1/gems/puppet-lint-1.1.0/lib/puppet-lint/lexer.rb:323:in `initialize': can't convert nil into String (TypeError)
remote:     from /var/lib/gems/1.9.1/gems/puppet-lint-1.1.0/lib/puppet-lint/lexer.rb:323:in `new'
remote:     from /var/lib/gems/1.9.1/gems/puppet-lint-1.1.0/lib/puppet-lint/lexer.rb:323:in `interpolate_string'
remote:     from /var/lib/gems/1.9.1/gems/puppet-lint-1.1.0/lib/puppet-lint/lexer.rb:183:in `tokenise'
remote:     from /var/lib/gems/1.9.1/gems/puppet-lint-1.1.0/lib/puppet-lint/checks.rb:25:in `load_data'
remote:     from /var/lib/gems/1.9.1/gems/puppet-lint-1.1.0/lib/puppet-lint/checks.rb:53:in `run'
remote:     from /var/lib/gems/1.9.1/gems/puppet-lint-1.1.0/lib/puppet-lint.rb:168:in `run'
remote:     from /var/lib/gems/1.9.1/gems/puppet-lint-1.1.0/lib/puppet-lint/bin.rb:59:in `block in run'
remote:     from /var/lib/gems/1.9.1/gems/puppet-lint-1.1.0/lib/puppet-lint/bin.rb:56:in `each'
remote:     from /var/lib/gems/1.9.1/gems/puppet-lint-1.1.0/lib/puppet-lint/bin.rb:56:in `run'
remote:     from /var/lib/gems/1.9.1/gems/puppet-lint-1.1.0/bin/puppet-lint:7:in `<top (required)>'
remote:     from /usr/local/bin/puppet-lint:23:in `load'
remote:     from /usr/local/bin/puppet-lint:23:in `<main>'
remote: Error: styleguide violation in manifests/site.pp (see above)
remote: Error: 13 styleguide violation(s) found. Commit will be aborted.
remote: Please follow the puppet style guide outlined at:
remote: http://docs.puppetlabs.com/guides/style_guide.html
remote: Error: 2 subhooks failed. Declining push.
To [email protected]:user/puppet-main.git
 ! [remote rejected] working_1 -> working_1 (pre-receive hook declined)
error: failed to push some refs to '[email protected]:user/puppet-main.git'
  1. The above output is more confusing for users then just giving the first correct error.
@garethhumphriesworldpay
Copy link
Contributor

garethhumphriesworldpay commented Jan 6, 2017

I think I fixed this a little while ago - can you confirm if it's still happening with HEAD?

@pillarsdotnet
Copy link

Confirmed; fixed here.

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

No branches or pull requests

3 participants