[Puppet Users] Puppet Parse Trees (for a lint checker)

2011-03-01 Thread Nick Moffitt
I mean to write a lint checker for my manifests, but I am not a ruby developer to any degree of proficiency. What I think I would like is some kind of serialization of the AST for a given .pp file, which I can then import into my own Python code and analyze for undesirable patterns. Is there any

Re: [Puppet Users] Puppet Parse Trees (for a lint checker)

2011-03-01 Thread Sandor Szuecs
On Mar 1, 2011, at 12:14 PM, Nick Moffitt wrote: Or is there already some easily-modifiable lint checker elsewhere? You probably want: puppet --parseonly file.pp All the best, Sandor Szücs -- -- You received this message because you are subscribed to the Google Groups Puppet Users

Re: [Puppet Users] Puppet Parse Trees (for a lint checker)

2011-03-01 Thread Nick Moffitt
(sorry Sandor, I hit individual reply entirely by mistake earlier) Sandor Szuecs: On Mar 1, 2011, at 12:14 PM, Nick Moffitt wrote: Or is there already some easily-modifiable lint checker elsewhere? You probably want: puppet --parseonly file.pp As of puppet 2.6.4 this does not print any

Re: [Puppet Users] Puppet Parse Trees (for a lint checker)

2011-03-01 Thread Dan Bode
Hi Nick (long time :) ) On Tue, Mar 1, 2011 at 3:14 AM, Nick Moffitt n...@zork.net wrote: I mean to write a lint checker for my manifests, but I am not a ruby developer to any degree of proficiency. What I think I would like is some kind of serialization of the AST for a given .pp file,

Re: [Puppet Users] Puppet Parse Trees (for a lint checker)

2011-03-01 Thread Nick Moffitt
Dan Bode: Hi Nick (long time :) ) Hi! Nearly a year, by now! It is possible to parse a given file and get an ASTArray back, is that sufficient? I am pretty sure you are going to have to get your hands into the Ruby code to really figure this out. I suppose so, although I hope that's

Re: [Puppet Users] Puppet Parse Trees (for a lint checker)

2011-03-01 Thread Henrik Lindberg
An alternative is to use the Geppetto tool which parses puppet manifests into a model. There is a Java API for this model. It can also be serialized in other formats that allow processing in other languages. I am interested in what lint rules you had in mind, maybe we could collaborate to