Skip to content

Commit

Permalink
Bugfix: ADR checker didn't exclude proposals from duplicate check (#496)
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Büchse <[email protected]>
  • Loading branch information
mbuechse authored Mar 5, 2024
1 parent 772e06b commit ccefe8e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Tests/chk_adrs.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ def emit(self, s):
def check_names(self, mds):
"""Check the list `mds` of md file names for name collisions"""
# count the occurrences of the prefixes of length 12, e.g., scs-0001-v1-
# no duplicates allowed
counts = collections.Counter([fn[:12] for fn in mds])
# no duplicates allowed, except for documents in Proposal state (scs-xxxx-...)
counts = collections.Counter([fn[:12] for fn in mds if fn[4:8].lower() != 'xxxx'])
duplicates = sorted([fn for fn in mds if counts[fn[:12]] > 1])
if duplicates:
self.emit(f"duplicates found: {', '.join(duplicates)}")
Expand Down

0 comments on commit ccefe8e

Please sign in to comment.