Fix double negatives on bool opts with underscores#551
Open
tommarshall wants to merge 1 commit intorails:mainfrom
Open
Fix double negatives on bool opts with underscores#551tommarshall wants to merge 1 commit intorails:mainfrom
tommarshall wants to merge 1 commit intorails:mainfrom
Conversation
Because: * rails#460 (released in `0.19.2`) introduced a change that prevents double negative options (`--no-no-foo`) for already negative boolean options (`--no-foo`). * That change checks if the option name string starts with 'no-', before it's `dasherized`, therefore negative options defined with underscores (`:no_foo`) still generate a double negative `--no-no-foo` option. This change: * Adds a test for, and fixes the double negative boolean options defined with underscores.
|
This is related to #553 in as far as negation of boolean flags is concerned. I feel as though this automatic negation provides more obscure behaviour than real benefits. Your fix kind of demonstrates the possible corner cases etc.... I'm not sure if this should be merged or the behaviour of actual negation changed. Teetering towards the later. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Because:
0.19.2) introduced a change that prevents double negative options (--no-no-foo) for already negative boolean options (--no-foo).dasherized, therefore negative options defined with underscores (:no_foo) still generate a double negative--no-no-foooption.This change:
defined with underscores.