Skip to content

Commit

Permalink
check: walk directory tree in sorted order
Browse files Browse the repository at this point in the history
Make verbose output more consistent.
  • Loading branch information
bgilbert committed Feb 2, 2021
1 parent b4773b9 commit c7a8fe6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions check.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ def handle_error(e):
raise e

ret = 0
for dirpath, _, filenames in os.walk('.', onerror=handle_error):
for filename in filenames:
for dirpath, dirnames, filenames in os.walk('.', onerror=handle_error):
dirnames.sort() # walk in sorted order
for filename in sorted(filenames):
filepath = os.path.join(dirpath, filename)
if not filename.endswith('.adoc'):
continue
Expand Down

0 comments on commit c7a8fe6

Please sign in to comment.