Skip to content

Commit dda2de3

Browse files
committed
Fixed error counting for lint command
Signed-off-by: Ole Herman Schumacher Elgesem <ole.elgesem@northern.tech>
1 parent 9ce4771 commit dda2de3

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

src/cfengine_cli/commands.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,7 @@ def _lint_single_arg(arg):
124124
if os.path.isdir(arg):
125125
return _lint_folder(arg)
126126
assert os.path.isfile(arg)
127-
_lint_single_file(arg)
128-
return 0
127+
return _lint_single_file(arg)
129128

130129

131130
def _lint(files) -> int:
@@ -138,9 +137,7 @@ def _lint(files) -> int:
138137
for file in files:
139138
errors += _lint_single_arg(file)
140139

141-
if errors == 0:
142-
return 0
143-
return 1
140+
return errors
144141

145142

146143
def lint(files) -> int:

0 commit comments

Comments
 (0)