Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrectly implements rules for nested matches #15

Open
ThisIsMissEm opened this issue Oct 10, 2020 · 2 comments
Open

Incorrectly implements rules for nested matches #15

ThisIsMissEm opened this issue Oct 10, 2020 · 2 comments

Comments

@ThisIsMissEm
Copy link

I recently discovered that the CODEOWNERS format isn't exactly the same as gitignore; it's similar but has a difference in the handling of foo/* vs foo/ — the former only matches files and directories that are direct descendants, so foo/baz.c and foo/bar/ would match, but foo/bar/baz.c would not.

This is based on the logic described in their example:

# In this example, @doctocat owns any files in the build/logs
# directory at the root of the repository and any of its
# subdirectories.
/build/logs/ @doctocat

# The `docs/*` pattern will match files like
# `docs/getting-started.md` but not further nested files like
# `docs/build-app/troubleshooting.md`.
docs/*  [email protected]

There's a similar issue in this package: hmarr/codeowners#2

@ThisIsMissEm ThisIsMissEm changed the title Incorrectly implements rules for matches Incorrectly implements rules for nested matches Oct 10, 2020
@beaugunderson
Copy link
Owner

appreciate the report & sorry for the delay in response--will tackle this after getting some unit tests in place :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants