github.com/google/go-github/v70@v70.0.0/.golangci.yml (about) 1 run: 2 build-tags: 3 - integration 4 timeout: 10m 5 linters: 6 enable: 7 - canonicalheader 8 - dogsled 9 - dupl 10 - gci 11 - gocritic 12 - godot 13 - gofmt 14 - goheader 15 - goimports 16 - gosec 17 - misspell 18 - nakedret 19 - paralleltest 20 - perfsprint 21 - revive 22 - sliceofpointers 23 - stylecheck 24 - tparallel 25 - unconvert 26 - unparam 27 - whitespace 28 linters-settings: 29 custom: 30 sliceofpointers: 31 type: module 32 description: Reports usage of []*string and slices of structs without pointers. 33 original-url: github.com/google/go-github/v68/tools/sliceofpointers 34 gocritic: 35 disable-all: true 36 enabled-checks: 37 - commentedOutCode 38 - commentFormatting 39 goheader: 40 values: 41 regexp: 42 CopyrightDate: "Copyright \\d{4} " 43 template: |- 44 {{CopyrightDate}}The go-github AUTHORS. All rights reserved. 45 46 Use of this source code is governed by a BSD-style 47 license that can be found in the LICENSE file. 48 gosec: 49 excludes: 50 # duplicates errcheck 51 - G104 52 # int(os.Stdin.Fd()) 53 - G115 54 misspell: 55 locale: US 56 ignore-words: 57 - "analyses" # returned by the GitHub API 58 - "cancelled" # returned by the GitHub API 59 # extra words from https://go.dev//wiki/Spelling 60 extra-words: 61 - typo: "marshall" 62 correction: "marshal" 63 - typo: "marshalled" 64 correction: "marshaled" 65 - typo: "marshalling" 66 correction: "marshaling" 67 - typo: "unmarshall" 68 correction: "unmarshal" 69 - typo: "unmarshalling" 70 correction: "unmarshaling" 71 - typo: "unmarshalled" 72 correction: "unmarshaled" 73 - typo: "unmarshalling" 74 correction: "unmarshaling" 75 perfsprint: 76 errorf: true 77 strconcat: false 78 revive: 79 # Set below 0.8 to enable error-strings rule. 80 confidence: 0.6 81 rules: 82 - name: blank-imports 83 - name: bool-literal-in-expr 84 - name: context-as-argument 85 - name: context-keys-type 86 - name: dot-imports 87 - name: early-return 88 - name: empty-block 89 - name: error-naming 90 - name: error-return 91 - name: error-strings 92 - name: errorf 93 - name: filename-format 94 arguments: 95 - "^[_a-z][_a-z0-9]*.go$" 96 - name: increment-decrement 97 - name: indent-error-flow 98 - name: package-comments 99 - name: range 100 - name: receiver-naming 101 - name: redefines-builtin-id 102 - name: superfluous-else 103 - name: time-equal 104 - name: time-naming 105 - name: unexported-naming 106 - name: unexported-return 107 - name: unreachable-code 108 - name: var-declaration 109 - name: var-naming 110 issues: 111 exclude-use-default: false 112 exclude-rules: 113 - linters: 114 - dupl 115 - unparam 116 - gosec 117 - dogsled 118 path: _test\.go 119 120 # We need to pass nil Context in order to test DoBare erroring on nil ctx. 121 - linters: [staticcheck] 122 text: "SA1012: do not pass a nil Context" 123 path: _test\.go 124 125 # We need to use sha1 for validating signatures 126 - linters: [gosec] 127 text: "G505: Blocklisted import crypto/sha1: weak cryptographic primitive" 128 129 # This is adapted from golangci-lint's default exclusions. It disables linting for error checks on 130 # os.RemoveAll, fmt.Fprint*, fmt.Scanf, and any function ending in "Close". 131 - linters: [errcheck] 132 text: Error return value of .(.*Close|fmt\.Fprint.*|fmt\.Scanf|os\.Remove(All)?). is not checked 133 134 # We don't care about file inclusion via variable in examples or internal tools. 135 - linters: [gosec] 136 text: "G304: Potential file inclusion via variable" 137 path: '^(example|tools)\/' 138 139 # We don't run parallel integration tests 140 - linters: [paralleltest, tparallel] 141 path: "^test/integration" 142 143 # Because fmt.Sprint(reset.Unix())) is more readable than strconv.FormatInt(reset.Unix(), 10). 144 - linters: [perfsprint] 145 text: "fmt.Sprint.* can be replaced with faster strconv.FormatInt"