File: .golangci.yml

package info (click to toggle)
golang-github-google-go-github 60.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 6,700 kB
  • sloc: sh: 111; makefile: 5
file content (53 lines) | stat: -rw-r--r-- 1,433 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
run:
  build-tags:
    - integration
  timeout: 10m
linters:
  enable:
    - dogsled
    - dupl
    - gofmt
    - goimports
    - gosec
    - misspell
    - nakedret
    - stylecheck
    - unconvert
    - unparam
    - whitespace
linters-settings:
  gosec:
    excludes:
      # duplicates errcheck
      - G104
      # performance issue: see https://github.com/golangci/golangci-lint/issues/4039
      # and https://github.com/securego/gosec/issues/1007
      - G602
issues:
  exclude-use-default: false
  exclude-rules:
    - linters:
        - dupl
        - unparam
        - gosec
        - dogsled
      path: _test\.go

    # We need to pass nil Context in order to test DoBare erroring on nil ctx.
    - linters: [ staticcheck ]
      text: 'SA1012: do not pass a nil Context'
      path: _test\.go

    # We need to use sha1 for validating signatures
    - linters: [ gosec ]
      text: 'G505: Blocklisted import crypto/sha1: weak cryptographic primitive'

    # This is adapted from golangci-lint's default exclusions. It disables linting for error checks on
    # os.RemoveAll and any function ending in "Close".
    - linters: [ errcheck ]
      text: Error return value of .(.*Close|os\.Remove(All)?). is not checked

    # We don't care about file inclusion via variable in examples or internal tools.
    - linters: [ gosec ]
      text: 'G304: Potential file inclusion via variable'
      path: '^(example|tools)\/'