github.com/helmwave/helmwave@v0.36.4-0.20240509190856-b35563eba4c6/.golangci.yml (about)

     1  # options for analysis running
     2  run:
     3    timeout: 10m
     4    build-tags:
     5      - integration
     6  
     7  output:
     8    # sorts results by: filepath, line and column
     9    sort-results: true
    10  
    11  linters:
    12    enable-all: true
    13    disable:
    14      - perfsprint
    15      - paralleltest
    16      - gochecknoglobals # we use globals
    17      - musttag # we don't need tags always
    18      - depguard # we know what we do. We can check extra deps via PRs changes.
    19      - contextcheck # we don't need contexts everywhere
    20      - deadcode # deprecated
    21      - revive # piece of shit
    22      - execinquery # deprecated
    23      - exhaustivestruct # deprecated
    24      - exhaustruct # it requires to initialize billions of fields, I ain't monkey to fix these
    25      - gci # we use gofumpt
    26      - gochecknoinits # we want to use `init()` functions
    27      - gocyclo # we use cyclop
    28      - godox # get rid of TODOs
    29      - goerr113 # renamed to err113
    30      - err113 # need to create wrapped static errors
    31      - goimports # we use gofumpt
    32      - golint # deprecated
    33      - gomnd # renamed to mnd
    34      - mnd # we want to keep magic numbers
    35      - ifshort # deprecated
    36      - inamedparam
    37      - interfacebloat # we want huge interfaces
    38      - interfacer # deprecated
    39      - ireturn # sometimes we need to return interfaces
    40      - maligned # deprecated
    41      - nakedret # sometimes we have to use naked returns
    42      - nonamedreturns # we do want some named returns
    43      - nosnakecase # deprecated
    44      - scopelint # deprecated
    45      - structcheck # deprecated
    46      - varcheck # deprecated
    47      - varnamelen # I don't think short names are bad
    48      - wsl # lots of style checks
    49  
    50  # all available settings of specific linters
    51  linters-settings:
    52    # https://golangci-lint.run/usage/linters/#lll
    53    tagalign:
    54      # Align and sort can be used together or separately.
    55      # Whether enable align. If true, the struct tags will be aligned.
    56      # Default: true.
    57      align: false
    58      # Whether enable tags sort.
    59      # If true, the tags will be sorted by name in ascending order.
    60      # eg: `xml:"bar" json:"bar" validate:"required"` -> `json:"bar" validate:"required" xml:"bar"`
    61      # Default: true
    62      sort: true
    63      order:
    64        - yaml
    65        - yml
    66        - json
    67        - toml
    68        - mapstructure
    69        - binding
    70        - validate
    71    cyclop:
    72      # the maximal code complexity to report
    73      max-complexity: 13
    74      # the maximal average package complexity. If it's higher than 0.0 (float) the check is enabled (default 0.0)
    75      package-average: 0.0
    76      # should ignore tests (default false)
    77      skip-tests: true
    78  
    79    dogsled:
    80      # checks assignments with too many blank identifiers; default is 2
    81      max-blank-identifiers: 2
    82  
    83    dupl:
    84      # tokens count to trigger issue, 150 by default
    85      threshold: 100
    86  
    87    errcheck:
    88      # report about not checking of errors in type assertions: `a := b.(MyStruct)`;
    89      # default is false: such cases aren't reported by default.
    90      check-type-assertions: false
    91  
    92      # report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`;
    93      # default is false: such cases aren't reported by default.
    94      check-blank: false
    95  
    96      # [deprecated] comma-separated list of pairs of the form pkg:regex
    97      # the regex is used to ignore names within pkg. (default "fmt:.*").
    98      # see https://github.com/kisielk/errcheck#the-deprecated-method for details
    99      ignore: fmt:.*,io/ioutil:^Read.*
   100  
   101    errorlint:
   102      # Check whether fmt.Errorf uses the %w verb for formatting errors. See the readme for caveats
   103      errorf: true
   104      # Check for plain type assertions and type switches
   105      asserts: true
   106      # Check for plain error comparisons
   107      comparison: true
   108  
   109    exhaustive:
   110      # check switch statements in generated files also
   111      check-generated: false
   112      # indicates that switch statements are to be considered exhaustive if a
   113      # 'default' case is present, even if all enum members aren't listed in the
   114      # switch
   115      default-signifies-exhaustive: true
   116  
   117    forbidigo:
   118      # Forbid the following identifiers (identifiers are written using regexp):
   119      forbid:
   120        - ^print.*$
   121        - 'fmt\.Print.*'
   122  
   123    funlen:
   124      lines: 69
   125      statements: 75
   126  
   127    gocognit:
   128      # minimal code complexity to report, 30 by default (but we recommend 10-20)
   129      min-complexity: 15
   130  
   131    nestif:
   132      # minimal complexity of if statements to report, 5 by default
   133      min-complexity: 6
   134  
   135    goconst:
   136      # minimal length of string constant, 3 by default
   137      min-len: 3
   138      # minimal occurrences count to trigger, 3 by default
   139      min-occurrences: 3
   140  
   141    gocritic:
   142      enabled-tags:
   143        - diagnostic
   144        - experimental
   145        - opinionated
   146        - performance
   147        - style
   148  
   149      disabled-checks:
   150        - commentedOutCode
   151        - typeSwitchVar
   152        - whyNoLint
   153        - yodaStyleExpr
   154  
   155      settings:
   156        captLocal: # must be valid enabled check name
   157          # whether to restrict checker to params only (default true)
   158          paramsOnly: true
   159        elseif:
   160          # whether to skip balanced if-else pairs (default true)
   161          skipBalanced: true
   162        hugeParam:
   163          # size in bytes that makes the warning trigger (default 80)
   164          sizeThreshold: 80
   165        nestingReduce:
   166          # min number of statements inside a branch to trigger a warning (default 5)
   167          bodyWidth: 5
   168        rangeExprCopy:
   169          # size in bytes that makes the warning trigger (default 512)
   170          sizeThreshold: 512
   171          # whether to check test functions (default true)
   172          skipTestFuncs: true
   173        rangeValCopy:
   174          # size in bytes that makes the warning trigger (default 128)
   175          sizeThreshold: 32
   176          # whether to check test functions (default true)
   177          skipTestFuncs: true
   178        ruleguard:
   179          # path to a gorules file for the ruleguard checker
   180          rules: ""
   181        truncateCmp:
   182          # whether to skip int/uint/uintptr types (default true)
   183          skipArchDependent: true
   184        underef:
   185          # whether to skip (*x).method() calls where x is a pointer receiver (default true)
   186          skipRecvDeref: true
   187        unnamedResult:
   188          # whether to check exported functions
   189          checkExported: true
   190  
   191    gofmt:
   192      # simplify code: gofmt with `-s` option, true by default
   193      simplify: true
   194  
   195    gofumpt:
   196      # Choose whether to use the extra rules that are disabled
   197      # by default
   198      extra-rules: false
   199  
   200    gomoddirectives:
   201      # Allow local `replace` directives. Default is false.
   202      replace-local: false
   203      # List of allowed `replace` directives. Default is empty.
   204      replace-allow-list:
   205        - launchpad.net/gocheck
   206      # Allow to not explain why the version has been retracted in the `retract` directives. Default is false.
   207      retract-allow-no-explanation: false
   208      # Forbid the use of the `exclude` directives. Default is false.
   209      exclude-forbidden: false
   210  
   211    gosec:
   212      # To select a subset of rules to run.
   213      # Available rules: https://github.com/securego/gosec#available-rules
   214      includes:
   215        - G401
   216        - G306
   217        - G101
   218      # To specify a set of rules to explicitly exclude.
   219      # Available rules: https://github.com/securego/gosec#available-rules
   220      excludes:
   221        - G204
   222      # To specify the configuration of rules.
   223      # The configuration of rules is not fully documented by gosec:
   224      # https://github.com/securego/gosec#configuration
   225      # https://github.com/securego/gosec/blob/569328eade2ccbad4ce2d0f21ee158ab5356a5cf/rules/rulelist.go#L60-L102
   226      config:
   227        G306: "0600"
   228        G101:
   229          pattern: "(?i)example"
   230          ignore_entropy: false
   231          entropy_threshold: "80.0"
   232          per_char_threshold: "3.0"
   233          truncate: "32"
   234  
   235    gosimple:
   236      # https://staticcheck.io/docs/options#checks
   237      checks:
   238        - all
   239  
   240    govet:
   241      # report about shadowed variables
   242      check-shadowing: false
   243  
   244      # settings per analyzer
   245      settings:
   246        printf: # analyzer name, run `go tool vet help` to see all analyzers
   247          funcs: # run `go tool vet help printf` to see available settings for `printf` analyzer
   248            - (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
   249            - (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
   250            - (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
   251            - (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
   252  
   253      enable-all: true
   254      disable:
   255        - shadow
   256  
   257    lll:
   258      # max line length, lines longer will be reported. Default is 120.
   259      # '\t' is counted as 1 character by default, and can be changed with the tab-width option
   260      line-length: 128
   261      # tab width in spaces. Default to 1.
   262      tab-width: 1
   263  
   264    makezero:
   265      # Allow only slices initialized with a length of zero. Default is false.
   266      always: false
   267  
   268    misspell:
   269      # Correct spellings using locale preferences for US or UK.
   270      # Default is to use a neutral variety of English.
   271      # Setting locale to US will correct the British spelling of 'colour' to 'color'.
   272      locale: US
   273  
   274    nakedret:
   275      # make an issue if func has more lines of code than this setting and it has naked returns; default is 30
   276      max-func-lines: 30
   277  
   278    nolintlint:
   279      # Enable to ensure that nolint directives are all used. Default is true.
   280      allow-unused: false
   281      # Enable to require nolint directives to mention the specific linter being suppressed. Default is false.
   282      require-specific: true
   283      allow-leading-space: true
   284  
   285    prealloc:
   286      # XXX: we don't recommend using this linter before doing performance profiling.
   287      # For most programs usage of prealloc will be a premature optimization.
   288  
   289      # Report preallocation suggestions only on simple loops that have no returns/breaks/continues/gotos in them.
   290      # True by default.
   291      simple: true
   292      range-loops: true # Report preallocation suggestions on range loops, true by default
   293      for-loops: false # Report preallocation suggestions on for loops, false by default
   294  
   295    promlinter:
   296      # Promlinter can't infer all metrics name in static analysis.
   297      # Enable strict mode will also include the errors caused by failing to parse the args.
   298      strict: false
   299      # Please refer to https://github.com/yeya24/promlinter#usage for detailed usage.
   300      disabled-linters: []
   301      #  - "Help"
   302      #  - "MetricUnits"к
   303  
   304      #  - "Counter"
   305      #  - "HistogramSummaryReserved"
   306      #  - "MetricTypeInName"
   307      #  - "ReservedChars"
   308      #  - "CamelCase"
   309      #  - "lintUnitAbbreviations"
   310  
   311    predeclared:
   312      # comma-separated list of predeclared identifiers to not report on
   313      ignore: ""
   314      # include method names and field names (i.e., qualified names) in checks
   315      q: false
   316  
   317    revive:
   318      enable-all-rules: true
   319  
   320      rules:
   321        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#add-constant
   322        - name: add-constant
   323          severity: warning
   324          disabled: true
   325          arguments:
   326            - maxLitCount: "3"
   327              allowStrs: '""'
   328              allowInts: "0,1,2"
   329              allowFloats: "0.0,0.,1.0,1.,2.0,2."
   330        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#argument-limit
   331        - name: argument-limit
   332          severity: warning
   333          disabled: true
   334          arguments: [4]
   335        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#atomic
   336        - name: atomic
   337          severity: warning
   338          disabled: false
   339        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#banned-characters
   340        - name: banned-characters
   341          severity: warning
   342          disabled: false
   343          arguments: ["Ω", "Σ", "σ", "7"]
   344        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#bare-return
   345        - name: bare-return
   346          severity: warning
   347          disabled: true
   348        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#blank-imports
   349        - name: blank-imports
   350          severity: warning
   351          disabled: false
   352        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#bool-literal-in-expr
   353        - name: bool-literal-in-expr
   354          severity: warning
   355          disabled: false
   356        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#call-to-gc
   357        - name: call-to-gc
   358          severity: warning
   359          disabled: false
   360        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#cognitive-complexity
   361        - name: cognitive-complexity
   362          severity: warning
   363          disabled: true
   364          arguments: [7]
   365        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#confusing-naming
   366        - name: confusing-naming
   367          severity: warning
   368          disabled: true
   369        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#confusing-results
   370        - name: confusing-results
   371          severity: warning
   372          disabled: false
   373        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#constant-logical-expr
   374        - name: constant-logical-expr
   375          severity: warning
   376          disabled: false
   377        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#context-as-argument
   378        - name: context-as-argument
   379          severity: warning
   380          disabled: false
   381        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#context-keys-type
   382        - name: context-keys-type
   383          severity: warning
   384          disabled: true
   385        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#cyclomatic
   386        - name: cyclomatic
   387          severity: warning
   388          disabled: true
   389          arguments: [3]
   390        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#datarace
   391        - name: datarace
   392          severity: warning
   393          disabled: false
   394        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#deep-exit
   395        - name: deep-exit
   396          severity: warning
   397          disabled: true
   398        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#defer
   399        - name: defer
   400          severity: warning
   401          disabled: false
   402          arguments:
   403            - ["call-chain", "loop"]
   404        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#dot-imports
   405        - name: dot-imports
   406          severity: warning
   407          disabled: false
   408        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#duplicated-imports
   409        - name: duplicated-imports
   410          severity: warning
   411          disabled: false
   412        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#early-return
   413        - name: early-return
   414          severity: warning
   415          disabled: true
   416        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#empty-block
   417        - name: empty-block
   418          severity: warning
   419          disabled: false
   420        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#empty-lines
   421        - name: empty-lines
   422          severity: warning
   423          disabled: false
   424        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#error-naming
   425        - name: error-naming
   426          severity: warning
   427          disabled: false
   428        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#error-return
   429        - name: error-return
   430          severity: warning
   431          disabled: false
   432        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#error-strings
   433        - name: error-strings
   434          severity: warning
   435          disabled: false
   436        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#errorf
   437        - name: errorf
   438          severity: warning
   439          disabled: false
   440        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#exported
   441        - name: exported
   442          severity: warning
   443          disabled: true
   444          arguments:
   445            - "checkPrivateReceivers"
   446            - "sayRepetitiveInsteadOfStutters"
   447        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#file-header
   448        - name: file-header
   449          severity: warning
   450          disabled: true
   451          arguments:
   452            - This is the text that must appear at the top of source files.
   453        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#flag-parameter
   454        - name: flag-parameter
   455          severity: warning
   456          disabled: true
   457        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#function-result-limit
   458        - name: function-result-limit
   459          severity: warning
   460          disabled: true
   461          arguments: [2]
   462        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#function-length
   463        - name: function-length
   464          severity: warning
   465          disabled: true
   466          arguments: [10, 0]
   467        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#get-return
   468        - name: get-return
   469          severity: warning
   470          disabled: true
   471        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#identical-branches
   472        - name: identical-branches
   473          severity: warning
   474          disabled: false
   475        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#if-return
   476        - name: if-return
   477          severity: warning
   478          disabled: true
   479        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#increment-decrement
   480        - name: increment-decrement
   481          severity: warning
   482          disabled: false
   483        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#indent-error-flow
   484        - name: indent-error-flow
   485          severity: warning
   486          disabled: false
   487        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#imports-blacklist
   488        - name: imports-blacklist
   489          severity: warning
   490          disabled: true
   491          arguments:
   492            - "crypto/md5"
   493            - "crypto/sha1"
   494        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#import-shadowing
   495        - name: import-shadowing
   496          severity: warning
   497          disabled: false
   498        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#line-length-limit
   499        - name: line-length-limit
   500          severity: warning
   501          disabled: true
   502          arguments: [80]
   503        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#max-public-structs
   504        - name: max-public-structs
   505          severity: warning
   506          disabled: false
   507          arguments: [3]
   508        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#modifies-parameter
   509        - name: modifies-parameter
   510          severity: warning
   511          disabled: false
   512        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#modifies-value-receiver
   513        - name: modifies-value-receiver
   514          severity: warning
   515          disabled: false
   516        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#nested-structs
   517        - name: nested-structs
   518          severity: warning
   519          disabled: true
   520        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#optimize-operands-order
   521        - name: optimize-operands-order
   522          severity: warning
   523          disabled: false
   524        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#package-comments
   525        - name: package-comments
   526          severity: warning
   527          disabled: true
   528        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#range
   529        - name: range
   530          severity: warning
   531          disabled: false
   532        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#range-val-in-closure
   533        - name: range-val-in-closure
   534          severity: warning
   535          disabled: false
   536        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#range-val-address
   537        - name: range-val-address
   538          severity: warning
   539          disabled: false
   540        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#receiver-naming
   541        - name: receiver-naming
   542          severity: warning
   543          disabled: false
   544        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#redefines-builtin-id
   545        - name: redefines-builtin-id
   546          severity: warning
   547          disabled: false
   548        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#string-of-int
   549        - name: string-of-int
   550          severity: warning
   551          disabled: false
   552        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#string-format
   553        - name: string-format
   554          severity: warning
   555          disabled: false
   556          arguments:
   557            - - "core.WriteError[1].Message"
   558              - "/^([^A-Z]|$)/"
   559              - must not start with a capital letter
   560            - - "fmt.Errorf[0]"
   561              - '/(^|[^\.!?])$/'
   562              - must not end in punctuation
   563            - - panic
   564              - '/^[^\n]*$/'
   565              - must not contain line breaks
   566        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#struct-tag
   567        - name: struct-tag
   568          severity: warning
   569          disabled: true
   570        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#superfluous-else
   571        - name: superfluous-else
   572          severity: warning
   573          disabled: false
   574        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#time-equal
   575        - name: time-equal
   576          severity: warning
   577          disabled: false
   578        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#time-naming
   579        - name: time-naming
   580          severity: warning
   581          disabled: false
   582        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#var-naming
   583        - name: var-naming
   584          severity: warning
   585          disabled: false
   586          arguments:
   587            - ["ID"] # AllowList
   588            - ["VM"] # DenyList
   589        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#var-declaration
   590        - name: var-declaration
   591          severity: warning
   592          disabled: false
   593        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unconditional-recursion
   594        - name: unconditional-recursion
   595          severity: warning
   596          disabled: false
   597        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unexported-naming
   598        - name: unexported-naming
   599          severity: warning
   600          disabled: true
   601        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unexported-return
   602        - name: unexported-return
   603          severity: warning
   604          disabled: true
   605        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unhandled-error
   606        - name: unhandled-error
   607          severity: warning
   608          disabled: true
   609          arguments:
   610            - "fmt.Printf"
   611        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unnecessary-stmt
   612        - name: unnecessary-stmt
   613          severity: warning
   614          disabled: true
   615        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unreachable-code
   616        - name: unreachable-code
   617          severity: warning
   618          disabled: false
   619        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-parameter
   620        - name: unused-parameter
   621          severity: warning
   622          disabled: true
   623        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-receiver
   624        - name: unused-receiver
   625          severity: warning
   626          disabled: true
   627        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#useless-break
   628        - name: useless-break
   629          severity: warning
   630          disabled: false
   631        # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#waitgroup-by-value
   632        - name: waitgroup-by-value
   633          severity: warning
   634          disabled: false
   635  
   636    staticcheck:
   637      # https://staticcheck.io/docs/options#checks
   638      checks:
   639        - all
   640  
   641    stylecheck:
   642      # https://staticcheck.io/docs/options#checks
   643      checks:
   644        - all
   645        - -ST1000
   646        - -ST1003
   647        - -ST1016
   648        - -ST1017
   649        - -ST1020
   650        - -ST1021
   651        - -ST1022
   652      # https://staticcheck.io/docs/options#dot_import_whitelist
   653      dot-import-whitelist:
   654        - fmt
   655      # https://staticcheck.io/docs/options#initialisms
   656      initialisms:
   657        - ACL
   658        - API
   659        - ASCII
   660        - CPU
   661        - CSS
   662        - DNS
   663        - EOF
   664        - GUID
   665        - HTML
   666        - HTTP
   667        - HTTPS
   668        - ID
   669        - IP
   670        - JSON
   671        - QPS
   672        - RAM
   673        - RPC
   674        - SLA
   675        - SMTP
   676        - SQL
   677        - SSH
   678        - TCP
   679        - TLS
   680        - TTL
   681        - UDP
   682        - UI
   683        - GID
   684        - UID
   685        - UUID
   686        - URI
   687        - URL
   688        - UTF8
   689        - VM
   690        - XML
   691        - XMPP
   692        - XSRF
   693        - XSS
   694      # https://staticcheck.io/docs/options#http_status_code_whitelist
   695      http-status-code-whitelist:
   696        - "200"
   697        - "400"
   698        - "404"
   699        - "500"
   700  
   701    tagliatelle:
   702      # check the struck tag name case
   703      case:
   704        # use the struct field name to check the name of the struct tag
   705        use-field-name: false
   706        rules:
   707          # any struct tag type can be used.
   708          # support string case:
   709          # `camel`, `pascal`, `kebab`, `snake`, `goCamel`, `goPascal`, `goKebab`, `goSnake`, `upper`, `lower`
   710          json: snake
   711          yaml: snake
   712  
   713    testifylint:
   714      enable-all: true
   715      disable:
   716        - require-error
   717  
   718    testpackage:
   719      # regexp pattern to skip files
   720      skip-regexp: (export|internal)_test\.go
   721  
   722    thelper:
   723      # The following configurations enable all checks. It can be omitted because all checks are enabled by default.
   724      # You can enable only required checks deleting unnecessary checks.
   725      test:
   726        first: true
   727        name: true
   728        begin: true
   729      benchmark:
   730        first: true
   731        name: true
   732        begin: true
   733      tb:
   734        first: true
   735        name: true
   736        begin: true
   737  
   738    unparam:
   739      # Inspect exported functions, default is false. Set to true if no external program/library imports your code.
   740      # XXX: if you enable this setting, unparam will report a lot of false-positives in text editors:
   741      # if it's called for subdir of a project it can't find external interfaces. All text editor integrations
   742      # with golangci-lint call it on a directory with the changed file.
   743      check-exported: false
   744  
   745    whitespace:
   746      multi-if: false # Enforces newlines (or comments) after every multi-line if statement
   747      multi-func: false # Enforces newlines (or comments) after every multi-line function signature
   748  
   749    wrapcheck:
   750      # An array of strings that specify substrings of signatures to ignore.
   751      # If this set, it will override the default set of ignored signatures.
   752      # See https://github.com/tomarrell/wrapcheck#configuration for more information.
   753      ignoreSigs:
   754        - .Errorf(
   755        - errors.New(
   756        - errors.Unwrap(
   757        - .Wrap(
   758        - .Wrapf(
   759        - .WithMessage(
   760        - .WithMessagef(
   761        - .WithStack(
   762      ignoreSigRegexps:
   763        - \.New.*Error\(
   764      ignorePackageGlobs:
   765        - context
   766        - encoding/*
   767        - github.com/pkg/*
   768        - github.com/helmwave/helmwave/*
   769  
   770    wsl:
   771      # See https://github.com/bombsimon/wsl/blob/master/doc/configuration.md for
   772      # documentation of available settings. These are the defaults for
   773      # `golangci-lint`.
   774      allow-assign-and-anything: false
   775      allow-assign-and-call: true
   776      allow-cuddle-declarations: false
   777      allow-multiline-assign: true
   778      allow-separated-leading-comment: false
   779      allow-trailing-comment: false
   780      force-case-trailing-whitespace: 0
   781      force-err-cuddling: false
   782      force-short-decl-cuddling: false
   783      strict-append: true
   784  
   785  issues:
   786    exclude-rules:
   787      - path: pkg/version/
   788        linters:
   789          - lll
   790          - wrapcheck
   791      - path: config\.go
   792        linters:
   793          - lll
   794      - path: _test\.go
   795        linters:
   796          - containedctx
   797          - dupl
   798          - dupword
   799          - forcetypeassert
   800          - funlen
   801          - goconst
   802          - godot
   803          - lll
   804          - revive
   805          - wrapcheck
   806  
   807    # Independently from option `exclude` we use default exclude patterns,
   808    # it can be disabled by this option. To list all
   809    # excluded by default patterns execute `golangci-lint run --help`.
   810    # Default value for this option is true.
   811    exclude-use-default: false
   812  
   813    # Maximum issues count per one linter. Set to 0 to disable. Default is 50.
   814    max-issues-per-linter: 0
   815  
   816    # Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
   817    max-same-issues: 0
   818  
   819    # Show only new issues: if there are unstaged changes or untracked files,
   820    # only those changes are analyzed, else only changes in HEAD~ are analyzed.
   821    # It's a super-useful option for integration of golangci-lint into existing
   822    # large codebase. It's not practical to fix all existing issues at the moment
   823    # of integration: much better don't allow issues in new code.
   824    # Default is false.
   825    new: false
   826  
   827  severity:
   828    # Default value is empty string.
   829    # Set the default severity for issues. If severity rules are defined and the issues
   830    # do not match or no severity is provided to the rule this will be the default
   831    # severity applied. Severities should match the supported severity names of the
   832    # selected out format.
   833    # - Code climate: https://docs.codeclimate.com/docs/issues#issue-severity
   834    # - Checkstyle: https://checkstyle.sourceforge.io/property_types.html#severity
   835    # - Github: https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-error-message
   836    default-severity: error
   837  
   838    # The default value is false.
   839    # If set to true severity-rules regular expressions become case-sensitive.
   840    case-sensitive: false
   841  
   842    # Default value is empty list.
   843    # When a list of severity rules are provided, severity information will be added to lint
   844    # issues. Severity rules have the same filtering capability as exclude rules except you
   845    # are allowed to specify one matcher per severity rule.
   846    # Only affects out formats that support setting severity information.
   847    rules:
   848      - severity: warning
   849        linters:
   850          - forcetypeassert
   851          - funlen
   852          - paralleltest
   853      - severity: notice
   854        linters:
   855          - godox
   856