github.com/yankunsam/loki/v2@v2.6.3-0.20220817130409-389df5235c27/.golangci.yml (about)

     1  # This file contains all available configuration options
     2  # with their default values.
     3  
     4  # options for analysis running
     5  run:
     6    # default concurrency is a available CPU number
     7    concurrency: 16
     8  
     9    # timeout for analysis, e.g. 30s, 5m, default is 1m
    10    timeout: 5m
    11  
    12    # exit code when at least one issue was found, default is 1
    13    issues-exit-code: 1
    14  
    15    # include test files or not, default is true
    16    tests: true
    17  
    18    # list of build tags, all linters use it. Default is empty list.
    19    build-tags: []
    20  
    21    # which dirs to skip: they won't be analyzed;
    22    # can use regexp here: generated.*, regexp is applied on full path;
    23    # default value is empty list, but next dirs are always skipped independently
    24    # from this option's value:
    25    #   	vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
    26    skip-dirs:
    27      - win_eventlog$
    28    # which files to skip: they will be analyzed, but issues from them
    29    # won't be reported. Default value is empty list, but there is
    30    # no need to include all autogenerated files, we confidently recognize
    31    # autogenerated files. If it's not please let us know.
    32    skip-files:
    33    - .*.pb.go
    34    - .*.y.go
    35    - .*.rl.go
    36  # output configuration options
    37  output:
    38    # colored-line-number|line-number|json|tab|checkstyle, default is "colored-line-number"
    39    format: colored-line-number
    40  
    41    # print lines of code with issue, default is true
    42    print-issued-lines: true
    43  
    44    # print linter name in the end of issue text, default is true
    45    print-linter-name: true
    46  
    47  linters-settings:
    48    goimports:
    49      local-prefixes: github.com/grafana/loki/pkg,github.com/grafana/loki/tools
    50  
    51    depguard:
    52      list-type: blacklist
    53      include-go-root: true
    54      packages-with-error-message:
    55        - github.com/go-kit/kit/log: "Use github.com/go-kit/log instead of github.com/go-kit/kit/log"
    56  
    57  linters:
    58    enable:
    59      - deadcode
    60      - errcheck
    61      - goconst
    62      - gofmt
    63      - goimports
    64      - revive
    65      - gosimple
    66      - ineffassign
    67      - staticcheck
    68      - misspell
    69      - structcheck
    70      - unconvert
    71      - unparam
    72      - varcheck
    73      - govet
    74      - unused
    75      - typecheck
    76      - depguard
    77      - exportloopref
    78  
    79  issues:
    80    exclude:
    81      - Error return value of .*log\.Logger\)\.Log\x60 is not checked
    82      - Error return value of .*.Log.* is not checked
    83      - Error return value of `` is not checked