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

[8.0.1] Report options with BoolOrEnumConverter as supporting --no... #24909

Merged
merged 1 commit into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ private static void emitFlagsAsProtoHelp(BlazeRuntime runtime, OutErr outErr) {
private static BazelFlagsProto.FlagInfo.Builder createFlagInfo(OptionDefinition option) {
BazelFlagsProto.FlagInfo.Builder flagBuilder = BazelFlagsProto.FlagInfo.newBuilder();
flagBuilder.setName(option.getOptionName());
flagBuilder.setHasNegativeFlag(option.hasNegativeOption());
flagBuilder.setHasNegativeFlag(option.usesBooleanValueSyntax());
flagBuilder.setDocumentation(option.getHelpText());
flagBuilder.setAllowsMultiple(option.allowsMultiple());
flagBuilder.setRequiresValue(option.requiresValue());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,6 @@ public boolean getBooleanValue(OptionsBase optionsBase) {
/** Returns a warning to use with this option if the old name is specified. */
public abstract boolean getOldNameWarning();

/** Returns whether an option --foo has a negative equivalent --nofoo. */
public boolean hasNegativeOption() {
return getType().equals(boolean.class) || getType().equals(TriState.class);
}

/** The type of the optionDefinition. */
public abstract Class<?> getType();

Expand Down
Loading