[rspec-users] Coding standards and whitespace
aslak.hellesoy at gmail.com
Tue Jul 31 17:41:19 EDT 2007
On 7/31/07, Wincent Colaiuta <win at wincent.com> wrote:
> El 31/7/2007, a las 22:48, aslak hellesoy escribió:
> > The root Rakefile has a task :fix_cr_lf which I ran a while ago to fix
> > newlines in .rb files. Perhaps it can be improved to scan over more
> > files, and replace \t with ' ' too?
> > I'll see what I can do.
> > Thoughts?
> Sounds like a good idea. I would suggest that \t should be replaced
> with ' ' only if it is in the leading whitespace for a line; if it
> is elsewhere in the line it is probably being (mis)used for alignment
> and it's probably better to just print a warning showing the filename
> and then you'd have to visually inspect it as a straight
> transliteration might not be right (it might be equivalent to one
> space, not two).
> I think it's also worth looking for trailing whitespace as it is
> almost always an mistake which apports neither semantic meaning nor
> visual enhancement.
Trailing whitespace is killed with the strip
> rspec-users mailing list
> rspec-users at rubyforge.org
More information about the rspec-users