Skip to content
This repository has been archived by the owner on Aug 1, 2020. It is now read-only.

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

Open
jaymzh opened this issue Dec 2, 2012 · 4 comments
Open

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

jaymzh opened this issue Dec 2, 2012 · 4 comments
Labels

Comments

@jaymzh
Copy link

jaymzh commented Dec 2, 2012

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
Copy link
Author

jaymzh commented Dec 2, 2012

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

@turboladen
Copy link
Owner

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
Copy link
Author

jaymzh commented Dec 3, 2012

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

@jaymzh
Copy link
Author

jaymzh commented Dec 3, 2012

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.

acrmp pushed a commit to acrmp/tailor that referenced this issue Aug 12, 2013
acrmp pushed a commit to acrmp/tailor that referenced this issue Aug 15, 2013
Rulers that take an integer option did not accept 'off' or 'false' at
the command line, essentially meaning that they could only be disabled
through config.

Refs turboladen#117, turboladen#118.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants