-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Puppet mutliline syntax errors with a "double at" are not caught #1435
Comments
Example error message:
Example of the bad syntax that caused this:
The parser is running... Output from :mes
SyntasticInfo
Relevant .vimrc
|
Please post a complete test file that produces these "bad" errors. I can't seem to obtain the error you mention with the piece o code above, and puppet 4.1.0. |
Throws this on parser validate:
|
Right: I can reproduce the problem now, but I'm not sure how to deal with it. The error message includes everything from the last quote on line 75 to the first quote on line 76, including the newline. Basically there can be anything there, I don't think there is any reasonable way to recover that as a normal error. |
I was attempting to patch this myself, and I couldn't think of a reasonable way either. It's a bit of an edge case, but one I seem to encounter often. I've had a few recurring errors that haven't been caught -- I suspect that they are all variants of this, but if I see anything else, I will provide info. |
Your best bet is probably to lobby the puppet developers to sanitize their error messages (removing all control characters would be a good start). Better yet, they could add an option to output the errors in a machine-friendly format (JSON would be nice), but I'd say that's unlikely to happen. As for other failing cases, there might well be. IIRC I dug through the puppet error functions at some point, prompted by a similar problem. I fixed the problem at the time, but there's no telling what else might lie hidden there. :) |
I've been missing a ton of stupid syntax errors lately that show up if I manually run "puppet parser validate filename" and I think it is because puppet is spitting out multiline errors with two "at"s in them.
The text was updated successfully, but these errors were encountered: