-
Notifications
You must be signed in to change notification settings - Fork 180
rewrite package codecov check, upload report #235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This is a test. |
Jenkins job test-infra/presubmit passed |
toolbox/pkg_check/main.go
Outdated
|
||
var ( | ||
reportFile = flag.String("report_file", "codecov.report", "Package code coverage report.") | ||
requirementFile = flag.String("requirement_file", "codecov.requirement", "Package code coverage requuirement.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type in requuirement
PTAL |
This is a test. |
Jenkins job test-infra/presubmit passed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PTAL
toolbox/pkg_check/main.go
Outdated
} | ||
}() | ||
|
||
scanner := bufio.NewScanner(f) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please give the format of the text you are trying to parse. It would help the reviewer understand what you are doing.
toolbox/pkg_check/main.go
Outdated
return scanner.Err() | ||
} | ||
|
||
func (c *codecovChecker) checkRequirement() error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment here. Please provide a sample requirement file.
toolbox/pkg_check/main.go
Outdated
scanner := bufio.NewScanner(f) | ||
for scanner.Scan() { | ||
parts := strings.Split(scanner.Text(), "\t") | ||
if len(parts) == 2 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should you log a warning in the other case ?
This is a test. |
1 similar comment
This is a test. |
Jenkins job test-infra/presubmit passed |
PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PTAL
toolbox/pkg_check/main.go
Outdated
//Report example: "ok istio.io/mixer/adapter/denyChecker 0.023s coverage: 100.0% of statements" | ||
//Report example: "? istio.io/mixer/adapter/denyChecker/config [no test files]" | ||
//expected output: c.codeCoverage["istio.io/mixer/adapter/denyChecker"] = 100 | ||
for scanner.Scan() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems very flaky. You should probably use a regular expression to extract the information.
This is a test. |
Jenkins job test-infra/presubmit passed |
PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much easier to read. Thanks!
This is a test. |
Jenkins job test-infra/presubmit passed |
No description provided.