ci: fix exhaustive linting (#8238)
Some checks are pending
Tests / test (./cmd/caddy/caddy, ~1.26.0, macos-14, 0, 1.26, mac) (push) Waiting to run
Tests / test (./cmd/caddy/caddy, ~1.26.0, ubuntu-latest, 0, 1.26, linux) (push) Waiting to run
Tests / test (./cmd/caddy/caddy.exe, ~1.26.0, windows-latest, True, 1.26, windows) (push) Waiting to run
Tests / test (s390x on IBM Z) (push) Waiting to run
Tests / goreleaser-check (push) Waiting to run
Cross-Build / build (~1.26.0, 1.26, aix) (push) Waiting to run
Cross-Build / build (~1.26.0, 1.26, darwin) (push) Waiting to run
Cross-Build / build (~1.26.0, 1.26, dragonfly) (push) Waiting to run
Cross-Build / build (~1.26.0, 1.26, freebsd) (push) Waiting to run
Cross-Build / build (~1.26.0, 1.26, illumos) (push) Waiting to run
Cross-Build / build (~1.26.0, 1.26, linux) (push) Waiting to run
Cross-Build / build (~1.26.0, 1.26, netbsd) (push) Waiting to run
Cross-Build / build (~1.26.0, 1.26, openbsd) (push) Waiting to run
Cross-Build / build (~1.26.0, 1.26, solaris) (push) Waiting to run
Cross-Build / build (~1.26.0, 1.26, windows) (push) Waiting to run
Lint / lint (push) Waiting to run
Lint / lint-1 (push) Waiting to run
Lint / lint-2 (push) Waiting to run
Lint / govulncheck (push) Waiting to run
Lint / dependency-review (push) Waiting to run
OpenSSF Scorecard supply-chain security / Scorecard analysis (push) Waiting to run

This commit is contained in:
Zen Dodd 2026-10-17 19:49:32 +10:00 • committed by GitHub
parent 2e0f806104
commit 1619352f4e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 6 additions and 2 deletions

View file

@ -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:

View file

@ -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) {

View file

@ -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() {

View file

@ -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