From f77f3ca4403d4596626971c1745105a1d9566e57 Mon Sep 17 00:00:00 2001 From: Bianca Lisle Date: Tue, 12 Nov 2024 19:37:25 +0000 Subject: [PATCH 1/2] Update hiddenEntries counter --- tools/cli/internal/changelog/outputfilter/hide.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/cli/internal/changelog/outputfilter/hide.go b/tools/cli/internal/changelog/outputfilter/hide.go index 840c54eb28..d227ecd13b 100644 --- a/tools/cli/internal/changelog/outputfilter/hide.go +++ b/tools/cli/internal/changelog/outputfilter/hide.go @@ -60,8 +60,10 @@ func hideByExemptions(entries []*OasDiffEntry, exemptions []breakingchanges.Exem hiddenEntries := 0 for _, entry := range entries { if entry.HideFromChangelog { + hiddenEntries++ continue } + for _, exemption := range exemptionsMarkedHidden { // If the path is not empty and the path is not in the exemption, skip if entry.Path != "" && !strings.Contains(exemption.BreakingChangeDescription, entry.Path) { @@ -79,8 +81,10 @@ func hideByExemptions(entries []*OasDiffEntry, exemptions []breakingchanges.Exem continue } + // Mark entry as hidden and break the exemption loop entry.HideFromChangelog = true hiddenEntries++ + break } } From c865044b48143b4e7accabbd4f15e00068643d57 Mon Sep 17 00:00:00 2001 From: Bianca Lisle Date: Tue, 12 Nov 2024 19:40:46 +0000 Subject: [PATCH 2/2] Fix lint --- tools/cli/internal/changelog/outputfilter/hide.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/cli/internal/changelog/outputfilter/hide.go b/tools/cli/internal/changelog/outputfilter/hide.go index d227ecd13b..b95f12e207 100644 --- a/tools/cli/internal/changelog/outputfilter/hide.go +++ b/tools/cli/internal/changelog/outputfilter/hide.go @@ -81,7 +81,7 @@ func hideByExemptions(entries []*OasDiffEntry, exemptions []breakingchanges.Exem continue } - // Mark entry as hidden and break the exemption loop + // Mark entry as hidden and break the exemption loop. entry.HideFromChangelog = true hiddenEntries++ break