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).
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user