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

Before

After

/path

include ^path.*

path/

include ^path/.*

path/*

include ^path/.*

path/to/file.rb$

include ^path/to/file.rb$

*/tests

include .*/tests.*

!path

exclude ^path.*

Logic

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

Did this page help you?