Add `MALFORMED_ENTRY_OWNER` error for CODEOWNERS
What does this MR do and why?
Problem
We currently use Entries with spaces for some errors that are actually Malformed owners. We need to change this so we convey a clear message of what's actually happening in the error.
Solution
We should add a new error type MALFORMED_ENTRY_OWNER: Malformed Owners
to be more specific about the error we are returning
References
Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
| Before | After |
|---|---|
![]() |
![]() |
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Navigate to existing or create new CODEOWNERS file
- Add your CODEOWNERS entries or use this
# Regular owner
*.rb @valid-user
# Just invalid owners
*.js not_a_user_not_an_email
# mixed of valid and invalid
*.js malformed @valid-user @valid-group another_malformed
- Go to
ee/lib/gitlab/code_owners/file.rband changeadd_error(Error::INVALID_ENTRY_OWNER_FORMAT, line_number)toadd_error(Error::MALFORMED_ENTRY_OWNER, line_number) - Refresh CODEOWNERS in gdk
- You should see the error for
line 5.
Related to #517961 (closed)

