-
-
Notifications
You must be signed in to change notification settings - Fork 670
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cover: use CamelCase for coverage variable
During the invocation of 'bazel coverage', rules_go will rewrite the source files using 'go tool cover -var <cover var name> ...' so that the variable can be extracted for coverage statistic later. For more information on this, review the relevant Official Go Team's blog post (1). rules_go currently injecting a variable using `Cover_snake_case` which is natural to starlark and python, however this will strip up some golang static analyzer for not following the `CamelCase` variable naming convention. In particular, if the generated source for coverage is run against `staticcheck`'s ST1003 installed as part of `nogo`, it will fail. Apply snake_case to CamelCase conversion on all coverage variables. (1): https://go.dev/blog/cover
- Loading branch information
Son Luong Ngoc
committed
Oct 13, 2021
1 parent
5de7041
commit 9a7f33e
Showing
2 changed files
with
25 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters