Ruby Coverage: Adjust group filters to avoid greedy files matches

The following discussion from !124957 (merged) should be addressed:

  • @splattael started a discussion:

    Question According to https://gitlab-org.gitlab.io/-/gitlab/-/jobs/4564435390/artifacts/coverage/index.html#_Config this is also matching non-config related files like ee/lib/gitlab/auth/oidc/config.rb because it uses String#include? to filter files.

    Is this intended? 🤔

    Screenshot_from_2023-07-04_11-51-47

    If we want to match files starting with config or ee/config should we use RegexpFilter instead?

    Suggestion (untested)

          add_group 'Config',       %r{^/(ee/)?config}

    I guess same goes for other group definitions as well. For example, Tooling:

    https://gitlab-org.gitlab.io/-/gitlab/-/jobs/4564435390/artifacts/coverage/index.html#_Tooling
    Screenshot_from_2023-07-04_11-57-08

    Having said that let's fix it in a follow-up. 💪

Edited Jul 05, 2023 by Peter Leitzen
Assignee Loading
Time tracking Loading