github.com/navikt/knorten@v0.0.0-20240419132333-1333f46ed8b6/.golangci.yml (about)

     1  run:
     2    go: '1.21'
     3    timeout: 10m
     4  
     5  linters:
     6    enable-all: true
     7    disable:
     8      # Linters that check comments for correctness; disallow fixme, todo, etc., missing punctuation, etc.
     9      - godox
    10      - godot
    11      - stylecheck
    12  
    13      # Linters with dubious value
    14      - depguard
    15      - tagalign
    16      - tagliatelle
    17      - goerr113
    18      - gci
    19      - varnamelen
    20  
    21      # These linters find structures with uninitialized fields, which is useful under
    22      # certain conditions, but shouldn't be generally enabled.
    23      - exhaustivestruct
    24      - exhaustruct
    25      - exhaustive
    26  
    27      # DEPRECATED LINTERS: do not re-enable
    28      # These linters have been abandoned by their authors and are no longer maintained, and
    29      # most have been replaced by newer linters.
    30      - deadcode
    31      - golint
    32      - ifshort
    33      - interfacer
    34      - maligned
    35      - nosnakecase
    36      - scopelint
    37      - structcheck
    38      - varcheck
    39  
    40  issues:
    41    # Show only new issues created after git revision
    42    # A long-term goal should be to fix all existing issues, and then remove this
    43    new-from-rev: HEAD
    44  
    45    exclude-use-default: false
    46    exclude-rules:
    47      - path: (.+)_test.go
    48        # NOTE: We should be very careful about excluding linters for test files, as tests are
    49        # also code and should be held to the same standards as the rest of the code.
    50        # Only exclude linters that are known to be problematic for test files, or don't
    51        # add value.
    52        linters:
    53          - dogsled
    54          - funlen
    55    exclude:
    56      # should have a package comment, unless it's in another file for this package (golint)
    57      - 'in another file for this package'
    58  
    59  linters-settings:
    60    dupl:
    61      threshold: 400
    62    lll:
    63      line-length: 170
    64    gocyclo:
    65      min-complexity: 15
    66    revive:
    67      ignore-generated-header: true
    68      rules:
    69        - name: package-comments
    70          disabled: true
    71  
    72  output:
    73    format: colored-line-number