From b02d4489618fc9209badce98cbfcc1e753c7c3f6 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sun, 26 Nov 2023 20:50:38 +0200 Subject: [PATCH 1/2] Process files in sorted rather than arbitrary order --- codespell_lib/_codespell.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codespell_lib/_codespell.py b/codespell_lib/_codespell.py index f914c07fc1..db1810ab6f 100644 --- a/codespell_lib/_codespell.py +++ b/codespell_lib/_codespell.py @@ -1190,7 +1190,7 @@ def main(*args: str) -> int: continue if is_hidden(root, options.check_hidden): # dir itself hidden continue - for file_ in files: + for file_ in sorted(files): # ignore hidden files in directories if is_hidden(file_, options.check_hidden): continue From bc8ed051efdd44dcb36722184614225741f104ab Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Mon, 27 Nov 2023 17:38:10 +0200 Subject: [PATCH 2/2] Sort the passed arguments --- codespell_lib/_codespell.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codespell_lib/_codespell.py b/codespell_lib/_codespell.py index db1810ab6f..a7bc025e61 100644 --- a/codespell_lib/_codespell.py +++ b/codespell_lib/_codespell.py @@ -1178,7 +1178,7 @@ def main(*args: str) -> int: return EX_USAGE bad_count = 0 - for filename in options.files: + for filename in sorted(options.files): # ignore hidden files if is_hidden(filename, options.check_hidden): continue