CodeOwners::Validator loads users and groups
Related to Gitlab::CodeOwners::Validator class naming is u... (#396314 - closed)
While looking at the Validator class I noticed that we are calling CodeOwners::Loader#entries
but we never actually access the entry users
or groups
which are loaded
We also load all the user, email, group, and role references, and instantiate Error objects because we using CodeOwners::File
which will parse the entire file when really we just need to extract all of the matching paths contained in the file and ignore the sections and references.
Proposal
Create a CodeOwners::PathFinder
class (or move this logic into the CodeOwners::Validator if it's simple enough) to only fetch the paths from the code owners file.
Edited by Joe Woodward