These docs are for v5.0. Click to read the latest docs for v2023.

Path Regexp

Outlining our regular expression technique used

The Codecov Yaml accepts regexp patterns to filter report content. Detailed below is the strategy of how codecov processes these paths.

Regexp patterns

🚧

Status Checks and Flags do not support Regex rules

At this time, the Codecov Flags and Status Checks features do not accept regex-based paths

BeforeAfter
/pathinclude ^path.*
path/include ^path/.*
path/*include ^path/.*
path/to/file.rb$include ^path/to/file.rb$
*/testsinclude .*/tests.*
!pathexclude ^path.*

Logic

if any negative match:
  skip
else if has positive matches:
  if positive match found:
    include
  else:
    skip
else:
  include