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

puppet-lint says syntax error, puppet parser says ok #230

Closed
mvernimmen opened this issue Oct 9, 2013 · 2 comments
Closed

puppet-lint says syntax error, puppet parser says ok #230

mvernimmen opened this issue Oct 9, 2013 · 2 comments

Comments

@mvernimmen
Copy link

This is a feature request to fix a small annoyance I ran into:

When I have a manifest in DOS line endings mode and then run puppet-lint, I sometimes (depending on the manifest) get this:

[max@zd007 hooks]$ puppet-lint --no-80chars-check --no-hard_tabs-check --no-2sp_soft_tabs-check --no-trailing_whitespace-check --log-format "%{KIND} %{check} says %{message} for %{filename} on line %{linenumber}" /home/m.vernimmen/svn/puppet/modules/staging/fredhopper/manifests/init.pp --with-context
ERROR unknown says Syntax error (try running puppet parser validate <file>) for init.pp on line 329

if ($hostname !~ /^pd0/) {
^

[max@zd007 hooks]$ puppet parser validate /home/m.vernimmen/svn/puppet/modules/staging/fredhopper/manifests/init.pp
[max@zd007 hooks]$

so puppet-lint says there is a syntax error, but the puppet parser validate command is silent (so says it's ok).

Once I convert the file with dos2unix the problem disappears.

The request is to please either:
handle files that are in DOS mode,
OR
give a warning that the file is in DOS mode instead of giving a 'syntax error' while not specifying what is wrong in the syntax.

@mvernimmen
Copy link
Author

patch is already in v4, just not released yet.

@dgutierrez1287
Copy link

Has this been fixed? I just ran into the same issue

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

2 participants