Skip to content

Incorrectly implements rules for nested matches #15

@ThisIsMissEm

Description

@ThisIsMissEm

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions