github.com/autonomy/conform@v0.1.0-alpha.16/hack/golangci-lint.yaml (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: 4
     8  
     9    # timeout for analysis, e.g. 30s, 5m, default is 1m
    10    deadline: 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  # output configuration options
    19  output:
    20    # colored-line-number|line-number|json|tab|checkstyle, default is "colored-line-number"
    21    format: line-number
    22  
    23  # all available settings of specific linters
    24  linters-settings:
    25    errcheck:
    26      # report about not checking of errors in type assetions: `a := b.(MyStruct)`;
    27      # default is false: such cases aren't reported by default.
    28      check-type-assertions: true
    29  
    30      # report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`;
    31      # default is false: such cases aren't reported by default.
    32      check-blank: true
    33    govet:
    34      # report about shadowed variables
    35      check-shadowing: true
    36    golint:
    37      # minimal confidence for issues, default is 0.8
    38      min-confidence: 0.8
    39    gofmt:
    40      # simplify code: gofmt with `-s` option, true by default
    41      simplify: true
    42    gocyclo:
    43      # minimal code complexity to report, 30 by default (but we recommend 10-20)
    44      min-complexity: 10
    45    maligned:
    46      # print struct with more effective memory layout or not, false by default
    47      suggest-new: true
    48    dupl:
    49      # tokens count to trigger issue, 150 by default
    50      threshold: 100
    51    goconst:
    52      # minimal length of string constant, 3 by default
    53      min-len: 3
    54      # minimal occurrences count to trigger, 3 by default
    55      min-occurrences: 3
    56    depguard: {}
    57    misspell:
    58      # Correct spellings using locale preferences for US or UK.
    59      # Default is to use a neutral variety of English.
    60      # Setting locale to US will correct the British spelling of 'colour' to 'color'.
    61      locale: US
    62    lll:
    63      # max line length, lines longer will be reported. Default is 120.
    64      # '\t' is counted as 1 character by default, and can be changed with the tab-width option
    65      line-length: 200
    66      # tab width in spaces. Default to 1.
    67      tab-width: 1
    68    unused:
    69      # treat code as a program (not a library) and report unused exported identifiers; default is false.
    70      # XXX: if you enable this setting, unused will report a lot of false-positives in text editors:
    71      # if it's called for subdir of a project it can't find funcs usages. All text editor integrations
    72      # with golangci-lint call it on a directory with the changed file.
    73      check-exported: false
    74    unparam:
    75      # call graph construction algorithm (cha, rta). In general, use cha for libraries,
    76      # and rta for programs with main packages. Default is cha.
    77      algo: cha
    78  
    79      # Inspect exported functions, default is false. Set to true if no external program/library imports your code.
    80      # XXX: if you enable this setting, unparam will report a lot of false-positives in text editors:
    81      # if it's called for subdir of a project it can't find external interfaces. All text editor integrations
    82      # with golangci-lint call it on a directory with the changed file.
    83      check-exported: false
    84    nakedret:
    85      # make an issue if func has more lines of code than this setting and it has naked returns; default is 30
    86      max-func-lines: 30
    87    prealloc:
    88      # XXX: we don't recommend using this linter before doing performance profiling.
    89      # For most programs usage of prealloc will be a premature optimization.
    90  
    91      # Report preallocation suggestions only on simple loops that have no returns/breaks/continues/gotos in them.
    92      # True by default.
    93      simple: true
    94      range-loops: true # Report preallocation suggestions on range loops, true by default
    95      for-loops: false # Report preallocation suggestions on for loops, false by default
    96  
    97  linters:
    98    enable-all: true
    99    disable:
   100      - gas
   101      - typecheck
   102      - gochecknoglobals
   103      - gochecknoinits
   104    disable-all: false
   105    fast: false
   106  
   107  issues:
   108    # List of regexps of issue texts to exclude, empty list by default.
   109    # But independently from this option we use default exclude patterns,
   110    # it can be disabled by `exclude-use-default: false`. To list all
   111    # excluded by default patterns execute `golangci-lint run --help`
   112    exclude: []
   113  
   114    # Independently from option `exclude` we use default exclude patterns,
   115    # it can be disabled by this option. To list all
   116    # excluded by default patterns execute `golangci-lint run --help`.
   117    # Default value for this option is true.
   118    exclude-use-default: false
   119  
   120    # Maximum issues count per one linter. Set to 0 to disable. Default is 50.
   121    max-per-linter: 0
   122  
   123    # Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
   124    max-same: 0
   125  
   126    # Show only new issues: if there are unstaged changes or untracked files,
   127    # only those changes are analyzed, else only changes in HEAD~ are analyzed.
   128    # It's a super-useful option for integration of golangci-lint into existing
   129    # large codebase. It's not practical to fix all existing issues at the moment
   130    # of integration: much better don't allow issues in new code.
   131    # Default is false.
   132    new: false