From dda2de3d62fb684f01d882299162efac547db836 Mon Sep 17 00:00:00 2001 From: Ole Herman Schumacher Elgesem Date: Wed, 18 Mar 2026 17:06:25 +0100 Subject: [PATCH] Fixed error counting for lint command Signed-off-by: Ole Herman Schumacher Elgesem --- src/cfengine_cli/commands.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/cfengine_cli/commands.py b/src/cfengine_cli/commands.py index 735feaf..a4cbb1c 100644 --- a/src/cfengine_cli/commands.py +++ b/src/cfengine_cli/commands.py @@ -124,8 +124,7 @@ def _lint_single_arg(arg): if os.path.isdir(arg): return _lint_folder(arg) assert os.path.isfile(arg) - _lint_single_file(arg) - return 0 + return _lint_single_file(arg) def _lint(files) -> int: @@ -138,9 +137,7 @@ def _lint(files) -> int: for file in files: errors += _lint_single_arg(file) - if errors == 0: - return 0 - return 1 + return errors def lint(files) -> int: