Merge pull request #8673 from mmorel-35/revive/unnecessary-stmt
chore: enable unnecessary-stmt from revivepull/8674/head
commit
5d9a4e84cb
|
@ -272,7 +272,6 @@ linters-settings:
|
|||
- name: unexported-return
|
||||
disabled: true
|
||||
- name: unnecessary-stmt
|
||||
disabled: true
|
||||
- name: unreachable-code
|
||||
- name: unused-parameter
|
||||
disabled: true
|
||||
|
|
|
@ -117,14 +117,9 @@ func applyPatchToObject(
|
|||
})
|
||||
}
|
||||
} else if len(strictErrs) > 0 {
|
||||
switch {
|
||||
//case validationDirective == metav1.FieldValidationWarn:
|
||||
// addStrictDecodingWarnings(requestContext, strictErrs)
|
||||
default:
|
||||
return apierrors.NewInvalid(schema.GroupKind{}, "", field.ErrorList{
|
||||
field.Invalid(field.NewPath("patch"), fmt.Sprintf("%+v", patchMap), runtime.NewStrictDecodingError(strictErrs).Error()),
|
||||
})
|
||||
}
|
||||
return apierrors.NewInvalid(schema.GroupKind{}, "", field.ErrorList{
|
||||
field.Invalid(field.NewPath("patch"), fmt.Sprintf("%+v", patchMap), runtime.NewStrictDecodingError(strictErrs).Error()),
|
||||
})
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
|
@ -37,8 +37,7 @@ func FromGRPCError(err error) error {
|
|||
}
|
||||
|
||||
for _, detail := range statusErr.Details() {
|
||||
switch t := detail.(type) {
|
||||
case *proto.Stack:
|
||||
if t, ok := detail.(*proto.Stack); ok {
|
||||
return &ProtoStackError{
|
||||
error: err,
|
||||
stack: t,
|
||||
|
|
Loading…
Reference in New Issue