Ignore folders but keep some files

Description

Our project has a structure that goes like this

  • FeatureA
    • UI
      • Some arbitrary folder structure
      • Some files *VM.swift
  • FeatureB
    • UI
      • Some arbitrary folder structure
      • Some files *VM.swift

Expected Results

I’d like to exclude all the files contained in the UI folders, but keep the VM ones.

Actual Results

Right now I’m excluding patterns for all the possible files I could have inside UI folders, such as *View.swift, *ViewController.swift. However, that doesn’t work 100% of the times because UI files can be named in various way. Therefore, I’d like to exclude everything except for *VM.swift
Is this possible?

@MarcoCadei can you share with me your .codecov.yml file and a commit SHA?