diff options
author | 2018-04-26 10:49:50 -0700 | |
---|---|---|
committer | 2018-04-26 10:51:35 -0700 | |
commit | a0317d3407907a7d208c5235d49eb1e9955ac80b (patch) | |
tree | f50413e57e70d8a28041ff73c0ff648c4b0a4873 /src/main | |
parent | e27b6bdd6f91efaae3d1b7b930e902b010aeefb6 (diff) |
Remove INTERNAL flags from help flags-as-proto.
These flags cannot be specified under any circumstances - the parser treats
them as absent, and they can't be named in config_setting, etc. - so listing
them here doesn't help anyone.
RELNOTES: None.
PiperOrigin-RevId: 194419952
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/runtime/commands/HelpCommand.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/commands/HelpCommand.java b/src/main/java/com/google/devtools/build/lib/runtime/commands/HelpCommand.java index 4de7cbf5f8..acd43a0aae 100644 --- a/src/main/java/com/google/devtools/build/lib/runtime/commands/HelpCommand.java +++ b/src/main/java/com/google/devtools/build/lib/runtime/commands/HelpCommand.java @@ -18,6 +18,7 @@ import com.google.common.base.Joiner; import com.google.common.base.Strings; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSortedMap; import com.google.common.collect.Iterables; import com.google.common.escape.Escaper; @@ -250,6 +251,10 @@ public final class HelpCommand implements BlazeCommand { Predicate<OptionDefinition> allOptions = option -> true; BiConsumer<String, OptionDefinition> visitor = (commandName, option) -> { + if (ImmutableSet.copyOf(option.getOptionMetadataTags()) + .contains(OptionMetadataTag.INTERNAL)) { + return; + } BazelFlagsProto.FlagInfo.Builder info = flags.computeIfAbsent(option.getOptionName(), key -> createFlagInfo(option)); info.addCommands(commandName); |