-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
House Cleaning Part 2 - Electric Boogaloo! (#133)
* Get rid of nolint:wsl comments We do not use wsl so no need to ignore its errors. * Get rid of nolint:gomnd comments We do not use gomnd so no need to ignore its errors. * Get rid of nolint:gocyclo comments that are unnecessary * Get rid of nolint:gocritic comments 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. * Get rid of pure nolinit comments Some lints may be relevant even in test fixture code. * Get rid of nolint:errcheck comments 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 * Fix CODEOWNERS and move to .github directory 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. * fillzero: Drop min We are now on go 1.22 so can use min from stdlib.
- Loading branch information
Showing
17 changed files
with
55 additions
and
115 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @joelrebel @mmlb @splaspood @turegano-equinix |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
//nolint:wsl // it's useless | ||
package firmware | ||
|
||
import ( | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
//nolint:all | ||
package firmware | ||
|
||
import ( | ||
|
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
// nolint: wsl,gocritic | ||
package utils | ||
|
||
import ( | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
//nolint:wsl // god it's useless | ||
package utils | ||
|
||
import ( | ||
|