| 1 | version: "2" |
| 2 | |
| 3 | run: |
| 4 | timeout: 5m |
| 5 | |
| 6 | linters: |
| 7 | exclusions: |
| 8 | presets: |
| 9 | - std-error-handling |
| 10 | rules: |
| 11 | # Test fixtures construct CDF binary blobs from known small constants, so |
| 12 | # gosec's integer-overflow checks (G115) add no value there. |
| 13 | - path: internal/cdf/cdf_test\.go |
| 14 | linters: |
| 15 | - gosec |
| 16 | enable: |
| 17 | - gosec # Detects security problems. |
| 18 | # Keep all extras disabled for now to focus on the integer overflow problem. |
| 19 | # TODO: enable these and other good linters |
| 20 | - dogsled # Detects assignments with too many blank identifiers. |
| 21 | - errcheck |
| 22 | - errchkjson # Detects unsupported types passed to json encoding functions and reports if checks for the returned error can be omitted. |
| 23 | - exhaustive # Detects missing options in enum switch statements. |
| 24 | - gocyclo |
| 25 | - govet |
| 26 | - ineffassign |
| 27 | - makezero # Finds slice declarations with non-zero initial length. |
| 28 | - misspell # Detects commonly misspelled English words in comments. |
| 29 | - nakedret # Detects uses of naked returns. |
| 30 | - prealloc # Detects slice declarations that could potentially be pre-allocated. |
| 31 | - predeclared # Detects code that shadows one of Go's predeclared identifiers. |
| 32 | - reassign # Detects reassigning a top-level variable in another package. |
| 33 | - staticcheck |
| 34 | - thelper # Detects test helpers without t.Helper(). |
| 35 | - tparallel # Detects inappropriate usage of t.Parallel(). |
| 36 | - unconvert # Detects unnecessary type conversions. |
| 37 | - unused |
| 38 | - usestdlibvars # Detects the possibility to use variables/constants from the Go standard library. |
| 39 | - usetesting # Reports uses of functions with replacement inside the testing package. |
| 40 | - asciicheck # https://daniel.haxx.se/blog/2025/05/16/detecting-malicious-unicode/ |
| 41 | settings: |
| 42 | govet: |
| 43 | disable: |
| 44 | - stdversion |
| 45 | gosec: |
| 46 | excludes: |
| 47 | - G404 # Weak random number generator used in tests. |
| 48 | - G304 # File inclusion |