#625 Issue closed
: Unify the true/false settings in our code¶
Labels: enhancement
, cleanup
gdha opened issue at 2015-07-24 08:21:¶
We have too many ways of defining a variable to be true of false, e.g.
VAR=
VAR=y
VAR=YES
VAR=1
VAR=yes
Maybe, we better create a simple function to unify this?
Feedback welcome...
schlomo commented at 2015-07-26 08:45:¶
+1
Do we have tri-states? Like Yes/No/Auto? Or Yes/No/Unset?
jsmeix commented at 2015-07-27 08:47:¶
When there is one or more common functions it can be enhanced as needed to test for as many states as needed like yes/no/auto/unset/default/...
I wonder if it is possible to test that common functions are actually used everywhere? In other words: How to find all places in the code that would need to be unified?
gdha commented at 2015-07-27 09:06:¶
There is no need to change all code at one moment - whenever, we feel the need (or come across one piece of code) we can change it...
jsmeix commented at 2015-07-27 09:46:¶
You are right.
Same reasoning as my own comment ("can be enhanced as needed"). Somehow I failed to apply my own reasoning to my own question ;-)
gdha commented at 2016-02-09 13:37:¶
Function seems to work. It is now just a question of using it when we
come across a script which uses a non standard test for true/fasle.
Added an example to
https://github.com/rear/rear/wiki/Coding-Style
[Export of Github issue for rear/rear.]