Open akien-mga opened 3 years ago
Hi @akien-mga
Thank you for getting in touch!
First what you can do is to disable the file checker. As a result, you can benefit from other checks.
env REPOSITORY_PATH="." \
CHECKS="owners,syntax,duppatterns" \
OWNER_CHECKER_REPOSITORY="godotengine/godot" \
./bin/codeowners-validator
or with GitHub Action:
name: codeowners-validator
on:
schedule:
# Runs at 08:00 UTC every day
- cron: '0 8 * * *'
workflow_dispatch:
jobs:
sanity:
runs-on: ubuntu-latest
steps:
# Checks-out your repository, which is validated in the next step
- uses: actions/checkout@v2
- name: GitHub CODEOWNERS Validator
uses: mszostok/codeowners-validator@v0.6.0
with:
checks: "owners,duppatterns,syntax" # `files` check not specified
experimental_checks: "notowned"
# GitHub access token is required only if the `owners` check is enabled
github_access_token: "${{ secrets.OWNERS_VALIDATOR_GITHUB_SECRET }}"
In the meantime I will check implementation and I will ping you when new version with fix will be available :)
Thanks :) I did use the other checks successfully, so I'm just reporting this as a false positive but it's in no way blocking.
@mszostok this same issue affects files as well as directories, if that affects the implementation of the fix. For example if I have:
conftest.py @octocat
GitHub will match the pattern against any conftest.py
in the repo, but the file checker will only pass if I have a conftest.py
in my repo root.
First of all thank you for this tool, it helped me fixed
CODEOWNERS
for https://github.com/godotengine/godot Turns out that review-requests don't work for teams withoutWrite
permission for some reason (as if a review from someone not able to press "Merge" is not valid), but your tool caught it + more issues :)Version 0.6.0, installed in
./bin
with curl instructions.Description
There seems to be a false positive report from the File Exist Checker when using relative paths which are then checked in all directories by
CODEOWNERS
. What I mean is what is described here: https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntaxThis will successfully match
apps/
directories in any directory of the repository, even if there's noapps/
directory in the root. Butcodeowners-validator
issues a warning about this case.Expected result No warning if any nested directory matches the pattern.
Actual result
Yet:
(This is on https://github.com/godotengine/godot/)
Steps to reproduce
env REPOSITORY_PATH="." OWNER_CHECKER_REPOSITORY="godotengine/godot" ./bin/codeowners-validator
Troubleshooting n/a