From bb779c6178941bc7f910929941223c6eb010b906 Mon Sep 17 00:00:00 2001 From: Ole Herman Schumacher Elgesem Date: Fri, 24 Apr 2026 13:44:38 +0200 Subject: [PATCH] cfengine format: Started skipping .input.cf test files These are input files for testing the formatter, we don't want them to be formatted. Co-authored-by: Claude Opus 4.6 (1M context) Signed-off-by: Ole Herman Schumacher Elgesem --- src/cfengine_cli/commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cfengine_cli/commands.py b/src/cfengine_cli/commands.py index 48e071e..0b373be 100644 --- a/src/cfengine_cli/commands.py +++ b/src/cfengine_cli/commands.py @@ -68,8 +68,8 @@ def _format_dirname(directory: str, line_length: int, check: bool) -> int: for name in sorted(files): if name.startswith("."): continue # Hidden files are ignored by default - if name.endswith(".x.cf"): - continue # Policy files with intentional mistakes + if name.endswith(".x.cf") or name.endswith(".input.cf"): + continue # Test files skipped during directory traversal filepath = os.path.join(root, name) if name.endswith(".json") or name.endswith(".cf"): ret |= _format_filename(filepath, line_length, check)