Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions src/cfengine_cli/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
Loading