Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify the true/false settings in our code #625

Closed
gdha opened this issue Jul 24, 2015 · 5 comments
Closed

Unify the true/false settings in our code #625

gdha opened this issue Jul 24, 2015 · 5 comments
Assignees
Labels
cleanup enhancement Adaptions and new features
Milestone

Comments

@gdha
Copy link
Member

gdha commented Jul 24, 2015

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...

@gdha gdha added enhancement Adaptions and new features cleanup waiting for info labels Jul 24, 2015
@gdha gdha added this to the Rear v1.18 milestone Jul 24, 2015
@schlomo
Copy link
Member

schlomo commented Jul 26, 2015

+1

Do we have tri-states? Like Yes/No/Auto? Or Yes/No/Unset?

@jsmeix
Copy link
Member

jsmeix commented Jul 27, 2015

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

gdha commented Jul 27, 2015

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

jsmeix commented Jul 27, 2015

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

gdha commented Feb 9, 2016

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

@gdha gdha closed this as completed Feb 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup enhancement Adaptions and new features
Projects
None yet
Development

No branches or pull requests

3 participants