From fa7024d3e4039165d667a739b63c5fff2d0e5cad Mon Sep 17 00:00:00 2001 From: Alessio Treglia Date: Thu, 26 Mar 2020 23:33:48 +0100 Subject: [PATCH] exclude generated code from code coverage statistics .codecov.yml is not working. We should filter out all generated code that we don't want to be included in the coverage report. --- .circleci/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 635bf9b0a9..18d519cf9a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -165,6 +165,8 @@ jobs: name: filter out DONTCOVER command: | excludelist="$(find ./ -type f -name '*.go' | xargs grep -l 'DONTCOVER')" + excludelist+=" $(find ./ -type f -name '*.pb.go')" + excludelist+=" $(find ./ -type f -path './tests/mocks/*.go')" for filename in ${excludelist}; do filename=$(echo $filename | sed 's/^./github.com\/cosmos\/cosmos-sdk/g') echo "Excluding ${filename} from coverage report..."