github.com/openconfig/goyang@v1.4.5/.github/linters/.golangci.yml (about)

     1  ---
     2  #########################
     3  #########################
     4  ## Golang Linter rules ##
     5  #########################
     6  #########################
     7  
     8  # configure golangci-lint
     9  # see https://github.com/golangci/golangci-lint/blob/master/.golangci.example.yml
    10  run:
    11    timeout: 10m
    12  issues:
    13    exclude-rules:
    14      - path: _test\.go
    15        linters:
    16          - dupl
    17          - gosec
    18          - goconst
    19    new: true
    20  linters:
    21    enable:
    22      - gosec
    23      - unconvert
    24      - goconst
    25      - goimports
    26      - gofmt
    27      - gocritic
    28      - govet
    29      - revive
    30      - staticcheck
    31      - unconvert
    32      - unparam
    33      - unused
    34      - wastedassign
    35      - whitespace
    36  linters-settings:
    37    errcheck:
    38      # report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`;
    39      # default is false: such cases aren't reported by default.
    40      check-blank: true
    41    govet:
    42      # report about shadowed variables
    43      check-shadowing: false
    44    maligned:
    45      # print struct with more effective memory layout or not, false by default
    46      suggest-new: true
    47    gocritic:
    48      disabled-checks:
    49        - singleCaseSwitch
    50        - appendAssign
    51    revive:
    52      ignore-generated-header: true
    53      severity: warning