mszostok / codeowners-validator

The GitHub CODEOWNERS file validator
Apache License 2.0
221 stars 47 forks source link

notowned with an empty codeowners file #126

Closed electriquo closed 2 years ago

electriquo commented 2 years ago

Description

Using version 0.7.1 with an empty CODEOWNERS file and setting experimental_checks: notowned displays an error and it does not fail the execution (see Actual result for the error message).

Expected result

If there is an error, the validator should fail with non zero exit code

Actual result

time="2022-02-27T09:21:01Z" level=error msg="while executing checker [Experimental] Not Owned File Checker: 1 error occurred:\n\t* fatal: No pathspec was given. Which files should I remove?\n: command \"xargs\": exit status 123\n\n" service="check:runner"

Steps to reproduce

Use the same setup as #121 with an empty CODEOWNERS file.

Troubleshooting

mszostok commented 2 years ago

It was a known issue: https://github.com/mszostok/codeowners-validator/blob/d95ed833d4bbe7104c26d7556c1d16fa1c6eb30d/internal/runner/runner_worker.go#L72

But now it's fixed by https://github.com/mszostok/codeowners-validator/pull/130