github.com/demonoid81/moby@v0.0.0-20200517203328-62dd8e17c460/hack/validate/golangci-lint.yml (about)

     1  linters:
     2    enable:
     3      - deadcode
     4      - goimports
     5      - golint
     6      - gosec
     7      - gosimple
     8      - govet
     9      - ineffassign
    10      - misspell
    11      - staticcheck
    12      - structcheck
    13      - typecheck
    14      - unconvert
    15      - unused
    16      - varcheck
    17  
    18    disable:
    19      - errcheck
    20  
    21    run:
    22      concurrency: 2
    23      modules-download-mode: vendor
    24  
    25      skip-dirs:
    26        - bundles
    27        - docs
    28  
    29  linters-settings:
    30    govet:
    31      check-shadowing: false
    32  
    33  issues:
    34    # The default exclusion rules are a bit too permissive, so copying the relevant ones below
    35    exclude-use-default: false
    36  
    37    exclude-rules:
    38      # These are copied from the default exclude rules, except for "ineffective break statement"
    39      # and GoDoc checks.
    40      # https://github.com/golangci/golangci-lint/blob/0cc87df732aaf1d5ad9ce9ca538d38d916918b36/pkg/config/config.go#L36
    41      - text: "Error return value of .((os\\.)?std(out|err)\\..*|.*Close|.*Flush|os\\.Remove(All)?|.*printf?|os\\.(Un)?Setenv). is not checked"
    42        linters:
    43          - errcheck
    44      - text: "func name will be used as test\\.Test.* by other packages, and that stutters; consider calling this"
    45        linters:
    46          - golint
    47      - text: "G103: Use of unsafe calls should be audited"
    48        linters:
    49          - gosec
    50      - text: "G104: Errors unhandled"
    51        linters:
    52          - gosec
    53      - text: "G204: Subprocess launch(ed with (variable|function call)|ing should be audited)"
    54        linters:
    55          - gosec
    56      - text: "(G301|G302): (Expect directory permissions to be 0750 or less|Expect file permissions to be 0600 or less)"
    57        linters:
    58          - gosec
    59      - text: "G304: Potential file inclusion via variable"
    60        linters:
    61          - gosec
    62  
    63      # Exclude some linters from running on tests files.
    64      - path: _test\.go
    65        linters:
    66          - errcheck
    67          - gosec
    68  
    69      # Suppress golint complaining about generated types in api/types/
    70      - text: "type name will be used as (container|volume)\\.(Container|Volume).* by other packages, and that stutters; consider calling this"
    71        path: "api/types/(volume|container)/"
    72        linters:
    73          - golint
    74      - text: "(G201|G202): SQL string (formatting|concatenation)"
    75        linters:
    76          - gosec
    77      # FIXME temporarily suppress these. See #39924
    78      - text: "SA1019: .*\\.Xattrs is deprecated: Use PAXRecords instead"
    79        linters:
    80          - staticcheck
    81      # FIXME temporarily suppress these. See #39926
    82      - text: "SA1019: httputil.NewClientConn is deprecated"
    83        linters:
    84          - staticcheck
    85      # FIXME temporarily suppress these (related to the ones above)
    86      - text: "SA1019: httputil.ErrPersistEOF is deprecated"
    87        linters:
    88          - staticcheck