[ftr] Speed up FTR code owner check (#205093)

## Summary

Switch to one matcher w/ all code owner patterns rather than separate
matchers for each code owner pattern. Reduces the run time of
`scripts/check_ftr_code_owners.js` by ~10x.

### Before
```console
▶ node scripts/check_ftr_code_owners.js
 info Reading CODEOWNERS file
 info Checking ownership for 8653 test files (this will take a while)
 info Ownership check complete (took 18.89 s)
 succ All test files have a code owner. 🥳
```

#### After
```console
▶ node scripts/check_ftr_code_owners.js
 info Checked 8653 test files in 1.59s
 succ All test files have a code owner 🥳
```
This commit is contained in:
David Olaru 2025-01-02 17:10:20 +00:00 committed by GitHub
parent de0dc52824
commit a0eebb82c9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 63 additions and 73 deletions

View file

@ -8,4 +8,4 @@
*/
require('../src/setup_node_env');
require('@kbn/test').runCheckFtrCodeOwnersCli();
void require('@kbn/test').checkFTRCodeOwnersCLI();