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

Feature request: fail for deleted files that are explicitly owned in CODEOWNERS #196

Open
devth opened this issue Apr 19, 2023 · 4 comments

Comments

@devth
Copy link

devth commented Apr 19, 2023

Description

If I have a file foo/bar.go explicitly covered by CODEOWNERS, e.g.

foo/bar.go @org/team

and I open a PR which deletes foo/bar.go, I'd like codeowners-validator to fail with a message saying something like:

File foo/bar.go does not exist, yet is covered in CODEOWENERS line 1 by the rule foo/bar.go @org/team

Reasons

You could argue that a CODEOWNERS file that contains rules for non-existent files is invalid. An error like above (maybe it's configurable) would prevent CODEOWNERS files from getting stale.

@devth
Copy link
Author

devth commented Apr 20, 2023

👋🏻 Would you be open to a PR for this?

@mszostok
Copy link
Owner

Hi @devth

I like the idea that you posted, and PR is always welcome 👍 I will do my best to do the review ASAP 👍

@devth
Copy link
Author

devth commented Apr 21, 2023

Thanks! I'll see when I get to it.

Do you think this behavior should be configurable, or always on?

@mszostok
Copy link
Owner

I try to maintain a behavior where all checks are optional, so each one can always enable what they really need to 👍

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

2 participants