-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Fix some errcheck errors #2881
Fix some errcheck errors #2881
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2881 +/- ##
==========================================
- Coverage 91.58% 91.57% -0.02%
==========================================
Files 312 312
Lines 15351 15352 +1
==========================================
- Hits 14059 14058 -1
- Misses 883 884 +1
- Partials 409 410 +1
Continue to review full report at Codecov.
|
Not sure why testbed tests are failing, keeping as draft until I figure it out |
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
receiver/hostmetricsreceiver/internal/scraper/processesscraper/processes_scraper_linux.go
Outdated
Show resolved
Hide resolved
So this fixes all errcheck errors in non-test code that are not in I will open a separate PR for fixing test code errchecks (which it's lower priority since it will not cause any breaking changes). |
receiver/hostmetricsreceiver/internal/scraper/processesscraper/processes_scraper_unix.go
Outdated
Show resolved
Hide resolved
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
@bogdandrutu Can you reply to the comment above whenever you find the time? thanks! |
testbed/testbed/results.go
Outdated
var err error | ||
err = os.MkdirAll(resultsDir, os.FileMode(0755)) | ||
if err != nil { | ||
log.Fatalf(err.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.
Just log.Fatal(err)
? And everywhere.
Also to avoid var shading, better to write:
if err := os.MkdirAll(resultsDir, os.FileMode(0755)); err != nil {
log.Fatal(err)
}
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.
Done
@bogdandrutu why is this PR pending? Can it be merged :-) |
* Check testbed errors * Check some more errors * Empty commit to retrigger CI * Address comments on hostmetricsreceiver * Rewrite some errchecking code * Inline ifs * Inline ifs and change log.Fatalf + Error() calls by log.Fatal
* Check testbed errors * Check some more errors * Empty commit to retrigger CI * Address comments on hostmetricsreceiver * Rewrite some errchecking code * Inline ifs * Inline ifs and change log.Fatalf + Error() calls by log.Fatal
* Check testbed errors * Check some more errors * Empty commit to retrigger CI * Address comments on hostmetricsreceiver * Rewrite some errchecking code * Inline ifs * Inline ifs and change log.Fatalf + Error() calls by log.Fatal
…pen-telemetry#2881) Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.25.3 to 0.26.3. - [Release notes](https://github.com/kubernetes/client-go/releases) - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](kubernetes/client-go@v0.25.3...v0.26.3) --- updated-dependencies: - dependency-name: k8s.io/client-go dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Description:
errcheck
linter errors in a non-breaking way.Link to tracking issue: Updates #2789
To be tracked on #2819.