-
Notifications
You must be signed in to change notification settings - Fork 3
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
House Cleaning Part 2 - Electric Boogaloo! #133
House Cleaning Part 2 - Electric Boogaloo! #133
Conversation
bcdf0dd
to
4219504
Compare
4219504
to
4b84639
Compare
I left you as an OWNER @diogomatsubara let me know if thats not useful/appropriate though. |
62febaa
to
764c187
Compare
.github/CODEOWNERS
Outdated
@@ -0,0 +1 @@ | |||
* @diogomatsubara @joelrebel @mmlb @turegano-equinix |
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 include @splaspood in this list
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
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.
Thanks for this cleanup, left a few minor suggestions
We do not use wsl so no need to ignore its errors.
We do not use gomnd so no need to ignore its errors.
2 ignores needed some small code changes to make it possible to avoid commenting gocritic out. Both in tests and both solved by using stdlib helpers. I replaced a os.MkdirTemp() with t.TempDir() that gets cleaned up when the test is done, this avoids needing to clean up the sub-dirs. I could have cleaned up tmpDir instead of using t.TempDir for the same effect but its better to let the stdlib do it if it wants to. The other change was to run loop tests under t.Run() so that gocritic stops complaining about defer-in-a-loop cases. This was probably the better option from the beginning anyway since it lets us test individually failing cases easily.
Some lints may be relevant even in test fixture code.
This one had me second guessing myself quite a lot. Turns out defer can't overwrite the return value so these are all not doing what it looks like they're doing[1]. In order to influence the return'd error we would have to used named return values so that err could be changed. I was going to just do a simple defer'd recover like: ``` func() { _ = recover() }() ``` to keep catching the panics and get the same result as today but decided to just do what was intendend instead. 1: https://go.dev/play/p/UIVjXdqajxI
The file was previously incorrect, they were specifying teams not people. Even if the names were correct the file would still not match intention since it is interpreted line-by-line which means only @joelrebel would have been used as the CODEOWNER. This commit fixes those errors, add myself and Nacho as owners and moves the GitHub centric file to the .github dir where other similar files already exist.
We are now on go 1.22 so can use min from stdlib.
c2c99d9
to
9f5184f
Compare
@joelrebel I've updated the CODEOWNERS file, I believe that was it right? PTAL. |
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/metal-toolbox/ironlib](https://github.com/metal-toolbox/ironlib) | `v0.2.18-0.20240611133518-3514176030a4` -> `v0.2.18` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fmetal-toolbox%2fironlib/v0.2.18?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fmetal-toolbox%2fironlib/v0.2.18?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fmetal-toolbox%2fironlib/v0.2.18-0.20240611133518-3514176030a4/v0.2.18?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fmetal-toolbox%2fironlib/v0.2.18-0.20240611133518-3514176030a4/v0.2.18?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>metal-toolbox/ironlib (github.com/metal-toolbox/ironlib)</summary> ### [`v0.2.18`](https://github.com/metal-toolbox/ironlib/releases/tag/v0.2.18) [Compare Source](https://github.com/metal-toolbox/ironlib/compare/v0.2.17...v0.2.18) #### What's Changed - Vc/instrument firmware by [@​DoctorVin](https://github.com/DoctorVin) in [https://github.com/metal-toolbox/ironlib/pull/123](https://github.com/metal-toolbox/ironlib/pull/123) - Dockerfile: add support to build non-dist image by [@​joelrebel](https://github.com/joelrebel) in [https://github.com/metal-toolbox/ironlib/pull/124](https://github.com/metal-toolbox/ironlib/pull/124) - Update actions/checkout action to v4 by [@​renovate](https://github.com/renovate) in [https://github.com/metal-toolbox/ironlib/pull/112](https://github.com/metal-toolbox/ironlib/pull/112) - House/spring cleaning by [@​mmlb](https://github.com/mmlb) in [https://github.com/metal-toolbox/ironlib/pull/128](https://github.com/metal-toolbox/ironlib/pull/128) - ironlib is able to fill a disk with all zeros by [@​turegano-equinix](https://github.com/turegano-equinix) in [https://github.com/metal-toolbox/ironlib/pull/131](https://github.com/metal-toolbox/ironlib/pull/131) - ironlib is able to detect ineffective wipes by [@​turegano-equinix](https://github.com/turegano-equinix) in [https://github.com/metal-toolbox/ironlib/pull/135](https://github.com/metal-toolbox/ironlib/pull/135) - House Cleaning Part 2 - Electric Boogaloo! by [@​mmlb](https://github.com/mmlb) in [https://github.com/metal-toolbox/ironlib/pull/133](https://github.com/metal-toolbox/ironlib/pull/133) - Better nvme capability detection by [@​mmlb](https://github.com/mmlb) in [https://github.com/metal-toolbox/ironlib/pull/129](https://github.com/metal-toolbox/ironlib/pull/129) - Quiet down tests by [@​mmlb](https://github.com/mmlb) in [https://github.com/metal-toolbox/ironlib/pull/137](https://github.com/metal-toolbox/ironlib/pull/137) - More refactors, fixes, etc by [@​mmlb](https://github.com/mmlb) in [https://github.com/metal-toolbox/ironlib/pull/141](https://github.com/metal-toolbox/ironlib/pull/141) - chore(deps): update docker/login-action action to v3 by [@​renovate](https://github.com/renovate) in [https://github.com/metal-toolbox/ironlib/pull/118](https://github.com/metal-toolbox/ironlib/pull/118) - chore(deps): update docker/build-push-action action to v5 by [@​renovate](https://github.com/renovate) in [https://github.com/metal-toolbox/ironlib/pull/113](https://github.com/metal-toolbox/ironlib/pull/113) - fix(deps): update module github.com/r3labs/diff/v2 to v3 by [@​renovate](https://github.com/renovate) in [https://github.com/metal-toolbox/ironlib/pull/108](https://github.com/metal-toolbox/ironlib/pull/108) - chore(deps): update docker/metadata-action action to v5 by [@​renovate](https://github.com/renovate) in [https://github.com/metal-toolbox/ironlib/pull/144](https://github.com/metal-toolbox/ironlib/pull/144) - chore(deps): update actions/setup-go action to v5 by [@​renovate](https://github.com/renovate) in [https://github.com/metal-toolbox/ironlib/pull/143](https://github.com/metal-toolbox/ironlib/pull/143) - chore(deps): update module google.golang.org/protobuf to v1.33.0 \[security] by [@​renovate](https://github.com/renovate) in [https://github.com/metal-toolbox/ironlib/pull/126](https://github.com/metal-toolbox/ironlib/pull/126) - fix(deps): update module golang.org/x/net to v0.23.0 \[security] by [@​renovate](https://github.com/renovate) in [https://github.com/metal-toolbox/ironlib/pull/116](https://github.com/metal-toolbox/ironlib/pull/116) - chore(deps): update docker/setup-buildx-action action to v3 by [@​renovate](https://github.com/renovate) in [https://github.com/metal-toolbox/ironlib/pull/146](https://github.com/metal-toolbox/ironlib/pull/146) - fix(deps): update module github.com/sirupsen/logrus to v1.9.3 by [@​renovate](https://github.com/renovate) in [https://github.com/metal-toolbox/ironlib/pull/100](https://github.com/metal-toolbox/ironlib/pull/100) - chore(deps): update anchore/sbom-action action to v0.15.11 by [@​renovate](https://github.com/renovate) in [https://github.com/metal-toolbox/ironlib/pull/99](https://github.com/metal-toolbox/ironlib/pull/99) - fix(deps): update module github.com/tidwall/gjson to v1.17.1 by [@​renovate](https://github.com/renovate) in [https://github.com/metal-toolbox/ironlib/pull/109](https://github.com/metal-toolbox/ironlib/pull/109) - fix(deps): update module golang.org/x/net to v0.24.0 by [@​renovate](https://github.com/renovate) in [https://github.com/metal-toolbox/ironlib/pull/145](https://github.com/metal-toolbox/ironlib/pull/145) - chore(deps): update golangci/golangci-lint-action action to v5 by [@​renovate](https://github.com/renovate) in [https://github.com/metal-toolbox/ironlib/pull/147](https://github.com/metal-toolbox/ironlib/pull/147) - fix(deps): update module github.com/stretchr/testify to v1.9.0 by [@​renovate](https://github.com/renovate) in [https://github.com/metal-toolbox/ironlib/pull/101](https://github.com/metal-toolbox/ironlib/pull/101) - fix(deps): update module github.com/beevik/etree to v1.3.0 by [@​renovate](https://github.com/renovate) in [https://github.com/metal-toolbox/ironlib/pull/97](https://github.com/metal-toolbox/ironlib/pull/97) - fix(deps): update module golang.org/x/net to v0.25.0 by [@​renovate](https://github.com/renovate) in [https://github.com/metal-toolbox/ironlib/pull/148](https://github.com/metal-toolbox/ironlib/pull/148) - chore(deps): update github/codeql-action action to v3 by [@​renovate](https://github.com/renovate) in [https://github.com/metal-toolbox/ironlib/pull/149](https://github.com/metal-toolbox/ironlib/pull/149) - Update CODEOWNERS by [@​DoctorVin](https://github.com/DoctorVin) in [https://github.com/metal-toolbox/ironlib/pull/152](https://github.com/metal-toolbox/ironlib/pull/152) - Update modules that renovate is having trouble with by [@​mmlb](https://github.com/mmlb) in [https://github.com/metal-toolbox/ironlib/pull/150](https://github.com/metal-toolbox/ironlib/pull/150) - chore(deps): update golangci/golangci-lint-action action to v6 by [@​renovate](https://github.com/renovate) in [https://github.com/metal-toolbox/ironlib/pull/153](https://github.com/metal-toolbox/ironlib/pull/153) - Add DiskWipe support to nvme using sanitize by [@​mmlb](https://github.com/mmlb) in [https://github.com/metal-toolbox/ironlib/pull/136](https://github.com/metal-toolbox/ironlib/pull/136) - Add format support to nvme WipeDisk by [@​mmlb](https://github.com/mmlb) in [https://github.com/metal-toolbox/ironlib/pull/142](https://github.com/metal-toolbox/ironlib/pull/142) - Add ns delete/create support to nvme WipeDisk by [@​mmlb](https://github.com/mmlb) in [https://github.com/metal-toolbox/ironlib/pull/154](https://github.com/metal-toolbox/ironlib/pull/154) - More clean ups by [@​mmlb](https://github.com/mmlb) in [https://github.com/metal-toolbox/ironlib/pull/158](https://github.com/metal-toolbox/ironlib/pull/158) - Add basic support for blkdiscard by [@​ScottGarman](https://github.com/ScottGarman) in [https://github.com/metal-toolbox/ironlib/pull/159](https://github.com/metal-toolbox/ironlib/pull/159) - Some more clean ups by [@​mmlb](https://github.com/mmlb) in [https://github.com/metal-toolbox/ironlib/pull/161](https://github.com/metal-toolbox/ironlib/pull/161) - Rename Disk stuff -> Drive and teach diskwipe example more tricks by [@​mmlb](https://github.com/mmlb) in [https://github.com/metal-toolbox/ironlib/pull/163](https://github.com/metal-toolbox/ironlib/pull/163) #### New Contributors - [@​turegano-equinix](https://github.com/turegano-equinix) made their first contribution in [https://github.com/metal-toolbox/ironlib/pull/131](https://github.com/metal-toolbox/ironlib/pull/131) - [@​ScottGarman](https://github.com/ScottGarman) made their first contribution in [https://github.com/metal-toolbox/ironlib/pull/159](https://github.com/metal-toolbox/ironlib/pull/159) **Full Changelog**: metal-toolbox/ironlib@v0.2.17...v0.2.18 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/metal-toolbox/vogelkop). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zOTMuMCIsInVwZGF0ZWRJblZlciI6IjM3LjM5My4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
What does this PR do
Gets rid of //nolint directives that were no longer needed or trivially fixed. Should have done this in the last PR but I forgot. Also fixes the CODEOWNERS file to be valid, moved it into .github dir and added myself and @turegano-equinix to it.