ci: fix exhaustive linting (#8238)
parent
2e0f806104
commit
1619352f4e
|
|
@ -62,8 +62,6 @@ linters:
|
|||
- fmt.*
|
||||
- (go.uber.org/zap/zapcore.ObjectEncoder).AddObject
|
||||
- (go.uber.org/zap/zapcore.ObjectEncoder).AddArray
|
||||
exhaustive:
|
||||
ignore-enum-types: reflect.Kind|svc.Cmd
|
||||
exclusions:
|
||||
generated: lax
|
||||
presets:
|
||||
|
|
|
|||
|
|
@ -207,6 +207,8 @@ func (ctx Context) LoadModule(structPointer any, fieldName string) (any, error)
|
|||
|
||||
var result any
|
||||
|
||||
// Unsupported field kinds return an error.
|
||||
//exhaustive:ignore
|
||||
switch val.Kind() {
|
||||
case reflect.Slice:
|
||||
if isJSONRawMessage(typ) {
|
||||
|
|
|
|||
|
|
@ -98,6 +98,8 @@ func UnwrapResponseWriterAs[T any](w http.ResponseWriter) (T, bool) {
|
|||
|
||||
func responseWriterPointer(w http.ResponseWriter) uintptr {
|
||||
v := reflect.ValueOf(w)
|
||||
// Only pointer-like kinds have stable identity.
|
||||
//exhaustive:ignore
|
||||
switch v.Kind() {
|
||||
case reflect.Pointer, reflect.Map, reflect.Chan, reflect.Func, reflect.Slice, reflect.UnsafePointer:
|
||||
if v.IsNil() {
|
||||
|
|
|
|||
|
|
@ -49,6 +49,8 @@ func (runner) Execute(args []string, request <-chan svc.ChangeRequest, status ch
|
|||
|
||||
for {
|
||||
req := <-request
|
||||
// Unsupported service controls are ignored.
|
||||
//exhaustive:ignore
|
||||
switch req.Cmd {
|
||||
case svc.Interrogate:
|
||||
status <- req.CurrentStatus
|
||||
|
|
|
|||
Loading…
Reference in New Issue