mszostok / codeowners-validator

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

Syntax checker doesn't capture parse error due to tilde (~) in paths #93

Open kjellander-unity opened 2 years ago

kjellander-unity commented 2 years ago

Description

It's rare, but can still happen, that you have paths with ~ in the path of the CODEOWNERS file. This makes GitHub's CODEOWNERS stop working silently. Unfortunately, this case is not caught by the Valid syntax checker.

Expected result

The checker should fail and point at the faulty line in CODEOWNERS.

Actual result

All checks are OK.

Steps to reproduce

Add a line like

/foo/bar/Documentation~/                            @mszostok 

then run

env REPOSITORY_PATH="." \
    GITHUB_ACCESS_TOKEN="$GH_TOKEN" \
    OWNER_CHECKER_REPOSITORY="mszostok/codeowners-validator" \
~/bin/codeowners-validator

Troubleshooting