Hi Gerardo,

Nice project!

A couple of things though, from someone who's been down this path before:

Developing against a moving target (i.e. the Puppet tokeniser) will end up 
causing you a non-trivial amount of pain. The point where I decided to roll my 
own tokeniser rather than use Puppet's (puppet-lint 0.2.x) was when variables 
containing dashes was "fixed", requiring me to add yet another monkeypatch to 
Puppet's tokeniser to reimplement the old behaviour, so that it could be 
detected. If you test puppet-cleaner against Puppet 0.25.x through 3.1.x, 
you'll see what I mean :)

Puppet's tokeniser and puppet-lint's tokeniser are actually very similar and 
work in much the same way (both are regex based and tokenise the entire file). 
Puppet-lint's adds some additional tokens that Puppet's does not need to 
concern itself with (formatting related whitespace mostly).

Cheers,
Tim

On 19/04/2013, at 3:45 AM, Gerardo Santana Gómez Garrido 
<gerardo.sant...@gmail.com> wrote:

> Hi Alcy,
> 
> that's nice! I used puppet-lint before writing puppet-cleaner and was very 
> useful at the time. Thanks to the author for writing it.
> 
> puppet-lint has an issue though that may make it more difficult to implement 
> those corrections: it uses regular expressions to tokenize the source code. 
> This was my first approach too, but it's limiting.
> 
> Having puppet's own tokenizer on your side is not just more helpful but 
> exact, there's no chance for errors at tokenizing the code, it's faster, and 
> you gain more introspection because you have the whole source code tokenized.
> 
> El jueves, 18 de abril de 2013 12:08:25 UTC-5, alcy escribió:
> Hello, 
> 
> On Thu, Apr 18, 2013 at 10:22 PM, Gerardo Santana Gómez Garrido 
> <gerardo...@gmail.com> wrote:
> A small follow up: the gem has just been pushed to rubygems, and you can read 
> more about the motivation for this at 
> http://santanatechnotes.blogspot.mx/2013/04/puppet-cleaner-010-released.html
> 
> 
> 
> This is nice, gotta check it out, thanks for writing it. Just a note though, 
> there was some recent work in puppet-lint 
> (http://bombasticmonkey.com/2013/01/28/fix-simple-problems-with-puppet-lint) 
> to autofix simple issues too. 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to