github.com/trustbloc/kms-go@v1.1.2/.golangci.yml (about)

     1  #
     2  # Copyright SecureKey Technologies Inc. All Rights Reserved.
     3  #
     4  # SPDX-License-Identifier: Apache-2.0
     5  #
     6  
     7  run:
     8    concurrency: 4
     9    deadline: 3m
    10    issues-exit-code: 1
    11    tests: true
    12    build-tags: [""]
    13    skip-dirs:
    14      - pkg/crypto/primitive/bbs12381g2pub/internal/kilic/bls12-381
    15  
    16  output:
    17    format: colored-line-number
    18    print-issued-lines: true
    19    print-linter-name: true
    20  
    21  linters-settings:
    22    errcheck:
    23      check-type-assertions: true
    24      check-blank: true
    25      ignore: fmt:.*,io/ioutil:^Read.*
    26    govet:
    27      check-shadowing: true
    28    golint:
    29      min-confidence: 0.6
    30    gofmt:
    31      simplify: true
    32    goimports:
    33      local-prefixes: github.com/hyperledger/aries-framework-go
    34    gocyclo:
    35      min-complexity: 10
    36    maligned:
    37      suggest-new: true
    38    dupl:
    39      threshold: 500
    40    goconst:
    41      min-len: 3
    42      min-occurrences: 3
    43    misspell:
    44      # default locale is a neutral variety of English.
    45      locale:
    46      ignore-words: []
    47    lll:
    48      line-length: 120
    49      tab-width: 1
    50    unused:
    51      check-exported: false
    52    unparam:
    53      check-exported: false
    54    nakedret:
    55      max-func-lines: 0
    56    gocritic:
    57      enabled-tags:
    58        - diagnostic
    59        - performance
    60        - style
    61        - opinionated
    62      disabled-checks:
    63        - unnamedResult
    64        - whyNoLint # TODO enable.
    65    funlen:
    66      lines: 60
    67      statements: 40
    68    wsl:
    69      strict-append: true
    70      allow-assign-and-call: true
    71      allow-multiline-assign: true
    72      allow-case-traling-whitespace: true
    73      allow-cuddle-declarations: false
    74    godot:
    75      check-all: false
    76    gomoddirectives:
    77      replace-local: true
    78  
    79  linters:
    80    enable-all: true
    81    disable:
    82      - nolintlint
    83      - varnamelen
    84      - tenv
    85      - tagliatelle
    86      - testpackage
    87      - maligned
    88      - prealloc
    89      - exhaustive #TODO enable
    90      - goerr113 # TODO enable
    91      - nlreturn # TODO enable
    92      - noctx # TODO enable
    93      - interfacer # deprecated by the author https://github.com/mvdan/interfacer#interfacer
    94      - scopelint # deprecated by the author https://github.com/kyoh86/scopelint#obsoleted
    95      - exhaustivestruct
    96      - paralleltest
    97      - tparallel
    98      - cyclop # TODO consider replacing gocyclo with cyclop
    99      - ifshort # TODO enable
   100      - makezero # TODO enable
   101      - wrapcheck # TODO enable
   102      - thelper # TODO enable
   103      - usestdlibvars
   104      - testableexamples
   105      - stylecheck
   106      - nosnakecase
   107      - gci
   108      - staticcheck
   109      - nonamedreturns
   110      - nilnil
   111      - ireturn
   112      - gomnd
   113      - gosimple
   114      - errchkjson
   115      - errname
   116      - dupword
   117      - interfacebloat
   118      - forcetypeassert
   119      - exhaustruct
   120      - contextcheck
   121      - containedctx
   122      - bodyclose
   123      - revive
   124      - gosec
   125      - gofumpt
   126      - gofmt
   127      - gocritic
   128      - goimports
   129      - gocognit
   130      - forbidigo
   131      - nosprintfhostport
   132      - typecheck
   133      - maintidx
   134      - depguard
   135      - musttag
   136      - mirror
   137      - errorlint
   138      - nakedret
   139  
   140  issues:
   141    exclude-use-default: false
   142    exclude-rules:
   143      - path: _test\.go
   144        linters:
   145          - dupl
   146          - funlen
   147          - gomnd
   148          - maintidx
   149          - gomnd
   150          - usestdlibvars
   151          - testableexamples
   152          - stylecheck
   153          - typecheck
   154          - maintidx
   155          - mirror
   156      - path: example_[^\/]*_test\.go
   157        linters:
   158          - dupl
   159          - funlen
   160          - gomnd
   161          - goconst
   162          - lll
   163      - source: "swagger:route"
   164        linters:
   165          - lll
   166  
   167    exclude:
   168      # Allow package logger variables (for now)
   169      - logger is a global variable
   170      # Add comments for package
   171      - at least one file in a package should have a package comment
   172      - Line contains TODO/BUG/FIXME
   173      # Allow magic number 1
   174      - Magic number[:] 1[^\d]
   175      # Temporarily allow old protobuf reference
   176      - package github.com/golang/protobuf/proto is deprecated