turboladen / tailor

A RubyGem that allows for checking standard styling of Ruby files.
146 stars 18 forks source link

--max-lines-in-* don't accept 'off' or 'false' #117

Open jaymzh opened 11 years ago

jaymzh commented 11 years ago

The --max-lines-in options don't seem to have a way to turn them off. They don't accept 'false' or 'off' per the help:

invalid argument: --max-code-lines-in-class off (OptionParser::InvalidArgument)

invalid argument: --max-code-lines-in-class false (OptionParser::InvalidArgument)

0 seems to work but since "num-spaces-*" options all take 0 as a specific value and not to mean "disable", this is awfully confusing.

jaymzh commented 11 years ago

Oh, I lied. 0 doesn't work either. :(

turboladen commented 11 years ago

Honestly, I'm not happy with how the config stuff turned out--I agree that it can be quite confusing if you try to do anything that's not default. It's also a PITA to test. :) Long term, I'd like to simplify that, but I'm not sure when I'll get to that. In the mean time, I'm open to suggestions and will try to get to them as I can.

jaymzh commented 11 years ago

While I agree there's room for architectural improvement, in the meantime, this seems like the same bug as 118...

jaymzh commented 11 years ago

BTW, if you're looking for an example of ways to represent configuration for these sorts of things, IMO, pylint gets a lot of this right. There are some things that are easier to lint in python compared to ruby, but some things that are harder... but they way in which they expressed their config is pretty good, I think.