github.com/google/go-github/v66@v66.0.0/.golangci.yml (about) 1 run: 2 build-tags: 3 - integration 4 timeout: 10m 5 linters: 6 enable: 7 - dogsled 8 - dupl 9 - gofmt 10 - goimports 11 - gosec 12 - misspell 13 - nakedret 14 - paralleltest 15 - stylecheck 16 - tparallel 17 - unconvert 18 - unparam 19 - whitespace 20 linters-settings: 21 gosec: 22 excludes: 23 # duplicates errcheck 24 - G104 25 # int(os.Stdin.Fd()) 26 - G115 27 issues: 28 exclude-use-default: false 29 exclude-rules: 30 - linters: 31 - dupl 32 - unparam 33 - gosec 34 - dogsled 35 path: _test\.go 36 37 # We need to pass nil Context in order to test DoBare erroring on nil ctx. 38 - linters: [ staticcheck ] 39 text: 'SA1012: do not pass a nil Context' 40 path: _test\.go 41 42 # We need to use sha1 for validating signatures 43 - linters: [ gosec ] 44 text: 'G505: Blocklisted import crypto/sha1: weak cryptographic primitive' 45 46 # This is adapted from golangci-lint's default exclusions. It disables linting for error checks on 47 # os.RemoveAll, fmt.Fprint*, fmt.Scanf, and any function ending in "Close". 48 - linters: [ errcheck ] 49 text: Error return value of .(.*Close|fmt\.Fprint.*|fmt\.Scanf|os\.Remove(All)?). is not checked 50 51 # We don't care about file inclusion via variable in examples or internal tools. 52 - linters: [ gosec ] 53 text: 'G304: Potential file inclusion via variable' 54 path: '^(example|tools)\/' 55 56 # We don't run parallel integration tests 57 - linters: [ paralleltest, tparallel ] 58 path: '^test/integration'