Skip to content

Commit 36fc58e

Browse files
authored
Fix go cover broken with goyacc (#1016)
1 parent 99d3a66 commit 36fc58e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,17 @@ tests-unit: ## Unit tests
150150
.PHONY: coverage-report
151151
coverage-report: ## Generate coverage report
152152
@echo "### Generating coverage report"
153+
# Fix go cover conflicting with goyacc generated code
154+
# See https://github.com/golang/go/issues/41222#issuecomment-3023898581
155+
sed -i -e '/yaccpar/d' cover.out
153156
go tool cover --func=./cover.out
154157

155158
.PHONY: coverage-report-html
156159
coverage-report-html: ## Generate HTML coverage report
157160
@echo "### Generating HTML coverage report"
161+
# Fix go cover conflicting with goyacc generated code
162+
# See https://github.com/golang/go/issues/41222#issuecomment-3023898581
163+
sed -i -e '/yaccpar/d' cover.out
158164
go tool cover --html=./cover.out
159165

160166
.PHONY: tests-fast

0 commit comments

Comments
 (0)