Skip to content

Commit

Permalink
Meta: Add check if AvailablePorts.md is sorted
Browse files Browse the repository at this point in the history
  • Loading branch information
circl-lastname authored and linusg committed Jun 2, 2022
1 parent 83b21d4 commit 06eca0a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Meta/lint-ports.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,12 @@ def run():
from_table_set = set(from_table.keys())
ports_set = set(ports.keys())

if list(from_table.keys()) != sorted(from_table.keys(), key=str.lower):
all_good = False
print('AvailablePorts.md is not in the correct order, please ensure that all ports are sorted as follows:')
for port in sorted(from_table.keys(), key=str.lower):
print(f" {port}")

if from_table_set - ports_set:
all_good = False
print('AvailablePorts.md lists ports that do not appear in the file system:')
Expand Down

0 comments on commit 06eca0a

Please sign in to comment.