tailor icon indicating copy to clipboard operation
tailor copied to clipboard

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

Open jaymzh opened this issue 12 years ago • 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.

jaymzh avatar Dec 02 '12 13:12 jaymzh

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

jaymzh avatar Dec 02 '12 13:12 jaymzh

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.

turboladen avatar Dec 03 '12 22:12 turboladen

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

jaymzh avatar Dec 03 '12 23:12 jaymzh

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.

jaymzh avatar Dec 03 '12 23:12 jaymzh