turboladen/tailor

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

Opened this issue · 4 comments

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.

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

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.

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

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.