Skip to content

Commit f281135

Browse files
committed
test: coverage script
1 parent b4fcc4e commit f281135

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

contracts/scripts/coverage.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ sed -i -e 's/\/.*\/kleros-v2\/contracts\///g' coverage/lcov-hardhat.info
2626
lcov \
2727
--ignore-errors format \
2828
--ignore-errors inconsistent \
29+
--ignore-errors empty \
2930
--rc max_message_count=3 \
3031
--rc derive_function_end_line=0 \
3132
--rc branch_coverage=1 \
@@ -35,7 +36,9 @@ lcov \
3536

3637
# Filter out unnecessary contracts from the report
3738
lcov \
39+
--ignore-errors format \
3840
--ignore-errors inconsistent \
41+
--ignore-errors empty \
3942
--rc max_message_count=3 \
4043
--rc branch_coverage=1 \
4144
--rc derive_function_end_line=0 \
@@ -47,11 +50,12 @@ lcov \
4750
if [ "$CI" != "true" ]; then
4851
# Generate the HTML report
4952
genhtml coverage/filtered-lcov.info \
53+
--ignore-errors format \
5054
--ignore-errors inconsistent \
55+
--ignore-errors empty \
56+
--ignore-errors category \
5157
--rc branch_coverage=1 \
5258
--rc max_message_count=3 \
53-
-o coverage \
54-
--ignore-errors category \
55-
--ignore-errors format
59+
-o coverage
5660
open coverage/index.html
5761
fi

0 commit comments

Comments
 (0)