mirror of
https://github.com/vmware-tanzu/pinniped.git
synced 2025-12-23 06:15:47 +00:00
Bump golangci-lint to 1.61.0
This commit is contained in:
@@ -43,7 +43,7 @@ linters:
|
|||||||
- whitespace
|
- whitespace
|
||||||
- copyloopvar
|
- copyloopvar
|
||||||
- intrange
|
- intrange
|
||||||
- fatcontext
|
# - fatcontext Starting in go@1.23.1 and golangci-lint@1.61.0 this gave a lot of false positives
|
||||||
# - canonicalheader Can't do this one since it alerts on valid headers such as X-XSS-Protection
|
# - canonicalheader Can't do this one since it alerts on valid headers such as X-XSS-Protection
|
||||||
- spancheck
|
- spancheck
|
||||||
- importas
|
- importas
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
1.60.3
|
1.61.0
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ func getWarningHandler() rest.WarningHandler {
|
|||||||
// the client-go rest.WarningHandlers all log warnings with non-empty message and code=299, agent is ignored
|
// the client-go rest.WarningHandlers all log warnings with non-empty message and code=299, agent is ignored
|
||||||
|
|
||||||
// no deduplication or color output when running from a non-terminal such as a pod
|
// no deduplication or color output when running from a non-terminal such as a pod
|
||||||
//nolint:gosec // this is an int, cast to uintptr, cast back to int
|
|
||||||
if isTerm := term.IsTerminal(int(os.Stderr.Fd())); !isTerm {
|
if isTerm := term.IsTerminal(int(os.Stderr.Fd())); !isTerm {
|
||||||
return rest.WarningLogger{}
|
return rest.WarningLogger{}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1461,7 +1461,7 @@ func forceUserInfoWithClaims(subject string, claims string) *coreosoidc.UserInfo
|
|||||||
|
|
||||||
// this is some dark magic to set a private field
|
// this is some dark magic to set a private field
|
||||||
claimsField := reflect.ValueOf(userInfo).Elem().FieldByName("claims")
|
claimsField := reflect.ValueOf(userInfo).Elem().FieldByName("claims")
|
||||||
claimsPointer := (*[]byte)(unsafe.Pointer(claimsField.UnsafeAddr())) //nolint:gosec // this is a test hack we are willing to live with
|
claimsPointer := (*[]byte)(unsafe.Pointer(claimsField.UnsafeAddr()))
|
||||||
*claimsPointer = []byte(claims)
|
*claimsPointer = []byte(claims)
|
||||||
|
|
||||||
return userInfo
|
return userInfo
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// stdin returns the file descriptor for stdin as an int.
|
// stdin returns the file descriptor for stdin as an int.
|
||||||
func stdin() int { return int(os.Stdin.Fd()) } //nolint:gosec // this is an int, cast to uintptr, cast back to int
|
func stdin() int { return int(os.Stdin.Fd()) }
|
||||||
|
|
||||||
type handlerState struct {
|
type handlerState struct {
|
||||||
// Basic parameters.
|
// Basic parameters.
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ func TestMain(m *testing.M) {
|
|||||||
func splitIntegrationTestsIntoBuckets(m *testing.M) {
|
func splitIntegrationTestsIntoBuckets(m *testing.M) {
|
||||||
// this is some dark magic to set a private field
|
// this is some dark magic to set a private field
|
||||||
testsField := reflect.ValueOf(m).Elem().FieldByName("tests")
|
testsField := reflect.ValueOf(m).Elem().FieldByName("tests")
|
||||||
testsPointer := (*[]testing.InternalTest)(unsafe.Pointer(testsField.UnsafeAddr())) //nolint:gosec // this is a test hack we are willing to live with
|
testsPointer := (*[]testing.InternalTest)(unsafe.Pointer(testsField.UnsafeAddr()))
|
||||||
|
|
||||||
tests := *testsPointer
|
tests := *testsPointer
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user