Skip to content

Make --recursive flag a string input #97

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

Merged
merged 1 commit into from
Dec 11, 2020
Merged

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Dec 10, 2020

Previously, the --recursive flag had a Boolean type. That is logical, since it uses values of true and false. However,
the fact that the default value of this flag is true changes matters. With the other Boolean flags, the default value
is false, so when you want to set it to true you only need to use the flag without a value, as is standard. But with a
default true flag it's necessary to unset the value, which can't be done with a bare flag, so you must pass false to the
flag. You would expect to be able to do this with either a space separator or an equals sign, just like
with the string flags, but the former is not supported:

$ ./arduino-check --recursive false
Configuration error: PROJECT_PATH argument false does not exist

Only the equals sign syntax is supported (--recursive=false).

So I think the UI is more intuitive with this flag a string type, so the behavior is consistent with the other flags.

Previously, the `--recursive` flag had a Boolean type. That is logical, since it uses values of true and false. However,
the fact that the default value of this flag is true changes matters. With the other Boolean flags, the default value
is false, so when you want to set it to true you only need to use the flag without a value, as is standard. But with a
default true flag it's necessary to unset the value, which can't be done with a bare flag, so you must pass false to the
flag. You would expect to be able to do this with either a space separator or an equals sign, just like
with the string flags, but the former is not supported:

$ ./arduino-check --recursive false
Configuration error: PROJECT_PATH argument false does not exist

Only the equals sign is supported (`--recursive=false`).

So I think the UI is more intuitive with this flag a string type, so the behavior is consistent with the other flags.
@per1234 per1234 force-pushed the per1234/recursive-flag-string branch from b2a56e8 to c260881 Compare December 11, 2020 23:31
@per1234 per1234 merged commit 7bb7aed into main Dec 11, 2020
@per1234 per1234 deleted the per1234/recursive-flag-string branch December 15, 2020 11:42
@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Sep 29, 2021
@per1234 per1234 self-assigned this Nov 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants