Skip to content

Commit 2847e64

Browse files
authored
Merge pull request #28 from olehermanse/main
Fixed error counting for lint command
2 parents 9ce4771 + dda2de3 commit 2847e64

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

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)