Skip to content

Commit

Permalink
Filter out no-op options from options descriptions HTML.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 642233077
Change-Id: I79a5b8e11def42961a7721c45f29682b9f49b57b
  • Loading branch information
meisterT authored and copybara-github committed Jun 11, 2024
1 parent 8a3aa5d commit 4d916c5
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,13 @@ public String describeOptionsHtml(Escaper escaper, String productName) {
for (Map.Entry<OptionDocumentationCategory, List<OptionDefinition>> e :
optionsByCategory.entrySet()) {
List<OptionDefinition> categorizedOptionsList = e.getValue();
categorizedOptionsList =
categorizedOptionsList.stream()
.filter(
optionDef ->
Arrays.stream(optionDef.getOptionEffectTags())
.noneMatch(effectTag -> effectTag.equals(OptionEffectTag.NO_OP)))
.collect(toImmutableList());
if (categorizedOptionsList.isEmpty()) {
continue;
}
Expand Down

0 comments on commit 4d916c5

Please sign in to comment.