github.com/google/go-github/v65@v65.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      - stylecheck
    15      - unconvert
    16      - unparam
    17      - whitespace
    18  linters-settings:
    19    gosec:
    20      excludes:
    21        # duplicates errcheck
    22        - G104
    23        # performance issue: see https://github.com/golangci/golangci-lint/issues/4039
    24        # and https://github.com/securego/gosec/issues/1007
    25        - G602
    26        # int(os.Stdin.Fd())
    27        - G115
    28  issues:
    29    exclude-use-default: false
    30    exclude-rules:
    31      - linters:
    32          - dupl
    33          - unparam
    34          - gosec
    35          - dogsled
    36        path: _test\.go
    37  
    38      # We need to pass nil Context in order to test DoBare erroring on nil ctx.
    39      - linters: [ staticcheck ]
    40        text: 'SA1012: do not pass a nil Context'
    41        path: _test\.go
    42  
    43      # We need to use sha1 for validating signatures
    44      - linters: [ gosec ]
    45        text: 'G505: Blocklisted import crypto/sha1: weak cryptographic primitive'
    46  
    47      # This is adapted from golangci-lint's default exclusions. It disables linting for error checks on
    48      # os.RemoveAll, fmt.Fprint*, fmt.Scanf, and any function ending in "Close".
    49      - linters: [ errcheck ]
    50        text: Error return value of .(.*Close|fmt\.Fprint.*|fmt\.Scanf|os\.Remove(All)?). is not checked
    51  
    52      # We don't care about file inclusion via variable in examples or internal tools.
    53      - linters: [ gosec ]
    54        text: 'G304: Potential file inclusion via variable'
    55        path: '^(example|tools)\/'