From 357c2a2b4453de74cc73d1f5a33b5f09095cbb00 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Thu, 20 Aug 2026 14:39:05 +0100 Subject: [PATCH] build: disable staticcheck SA4023 to fix lint job timeout The dataflow analysis behind SA4023, new in the staticcheck 0.8.0 bundled with golangci-lint v2.13.0, makes linting large packages more than 10x slower (89s vs 7s for backend/s3 alone) which took the CI lint job past its 30 minute limit. golangci-lint no longer enforces its run timeout during analysis so the job ran until cancelled, and the cancellation meant the lint cache was never saved, making every subsequent run cold and guaranteeing the timeout repeated. The check also produces false positives (eg claiming operations.Delete never returns nil). --- .golangci.yml | 5 +++++ fs/log/log.go | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 5f33d6183..4b5d373d1 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -46,6 +46,11 @@ linters: - -ST1022 # Disable quickfix checks - -QF* + # Disabled because its dataflow analysis (new in staticcheck + # 0.8.0) makes linting large packages more than 10x slower, + # which takes the CI lint job past its timeout, and it + # produces false positives (eg on operations.Delete). + - -SA4023 gocritic: # With gocritic there are different settings, but since enabled-checks # and disabled-checks cannot both be set, for full customization the diff --git a/fs/log/log.go b/fs/log/log.go index 8f1896633..2de359e05 100644 --- a/fs/log/log.go +++ b/fs/log/log.go @@ -291,8 +291,7 @@ func InitLogging() { // Windows event logging if Opt.WindowsEventLogLevel != fs.LogLevelOff { - err := startWindowsEventLog(Handler) - if err != nil { + if err := startWindowsEventLog(Handler); err != nil { fs.Fatalf(nil, "Failed to start windows event log: %v", err) } }