Advertisement
gravitiq

Untitled

Dec 27th, 2024
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 4.14 KB | None | 0 0
  1. run:
  2.  # Number of operating system threads (`GOMAXPROCS`) that can execute golangci-lint simultaneously.
  3.   # If it is explicitly set to 0 (i.e. not the default) then golangci-lint will automatically set the value to match Linux container CPU quota.
  4.   # Default: the number of logical CPUs in the machine
  5.   concurrency: 0
  6.   timeout: 3m
  7.  
  8. linters:
  9.   disable-all: true
  10.   enable:
  11.    - asasalint
  12.     - asciicheck
  13.     - bidichk
  14.     - bodyclose
  15.     - canonicalheader
  16.     - containedctx
  17.     - contextcheck
  18.     - copyloopvar
  19.     - cyclop
  20.     - decorder
  21.     - dogsled
  22.     - dupword
  23.     - durationcheck
  24.     - errcheck
  25.     - errchkjson
  26.     - errname
  27.     - errorlint
  28.     - exhaustive
  29.     - fatcontext
  30.     - forbidigo
  31.     - forcetypeassert
  32.     - gci
  33.     - ginkgolinter
  34.     - gocheckcompilerdirectives
  35.     - gochecknoglobals
  36.     - gochecknoinits
  37.     - gochecksumtype
  38.     - gocognit
  39.     - goconst
  40.     - gocritic
  41.     - gocyclo
  42.     - godot
  43.     - godox
  44.     - gofmt
  45.     - gofumpt
  46.     - goheader
  47.     - goimports
  48.     - gomoddirectives
  49.     - gomodguard
  50.     - goprintffuncname
  51.     - gosec
  52.     - gosimple
  53.     - gosmopolitan
  54.     - govet
  55.     - grouper
  56.     - iface
  57.     - importas
  58.     - inamedparam
  59.     - ineffassign
  60.     - interfacebloat
  61.     - ireturn
  62.     - loggercheck
  63.     - maintidx
  64.     - makezero
  65.     - mirror
  66.     - misspell
  67.     - musttag
  68.     - nakedret
  69.     - nestif
  70.     - nilerr
  71.     - nilnil
  72.     - nlreturn
  73.     - noctx
  74.     - nolintlint
  75.     - nosprintfhostport
  76.     - paralleltest
  77.     - perfsprint
  78.     - prealloc
  79.     - predeclared
  80.     - promlinter
  81.     - protogetter
  82.     - reassign
  83.     - recvcheck
  84.     - revive
  85.     - rowserrcheck
  86.     - sloglint
  87.     - spancheck
  88.     - sqlclosecheck
  89.     - staticcheck
  90.     - stylecheck
  91.     - tagalign
  92.     - tagliatelle
  93.     - tenv
  94.     - testableexamples
  95.     - testifylint
  96.     - thelper
  97.     - tparallel
  98.     - unconvert
  99.     - unparam
  100.     - unused
  101.     - usestdlibvars
  102.     - wastedassign
  103.     - whitespace
  104.     - wsl
  105.     - zerologlint
  106.  
  107. output:
  108.  # Default: false
  109.   sort-results: true
  110.   # Default: ["file"]
  111.   sort-order:
  112.    - linter
  113.     - file
  114.  
  115. linters-settings:
  116.   tagliatelle:
  117.    # Checks the struct tag name case.
  118.     case:
  119.       rules:
  120.         json: snake
  121.         yaml: snake
  122.         xml: snake
  123.         toml: snake
  124.         bson: snake
  125.         avro: snake
  126.         mapstructure: snake
  127.         env: snake
  128. #        env: upperSnake
  129.         envconfig: upperSnake
  130.         whatever: snake
  131.  
  132.  
  133.   revive:
  134.     enable-all-rules: true
  135.     rules:
  136.       - name: unexported-return
  137.         disabled: true
  138.       - name: line-length-limit
  139.         disabled: true
  140.       - name: add-constant
  141.         disabled: true
  142.       - name: unhandled-error
  143.         disabled: true
  144.       - name: comment-spacings
  145.         disabled: true
  146.       - name: var-naming
  147.         disabled: true
  148.       - name: nested-structs
  149.         disabled: true
  150.       - name: max-public-structs
  151.         disabled: true
  152.       - name: function-length
  153.         disabled: true
  154.       - name: import-shadowing
  155.         disabled: true
  156.       - name: import-alias-naming
  157.         disabled: true
  158.       - name: empty-block
  159.         disabled: true
  160.       - name: confusing-naming
  161.         disabled: true
  162.       - name: exported
  163.         disabled: true
  164.       - name: unused-receiver
  165.         disabled: true
  166.       - name: indent-error-flow
  167.         disabled: true
  168.       - name: early-return
  169.         disabled: true
  170.       - name: use-any
  171.         disabled: true
  172.       - name: argument-limit
  173.         disabled: true
  174.       - name: cognitive-complexity
  175.         disabled: true
  176.       - name: cyclomatic
  177.         arguments:
  178.          - 15
  179.       - name: confusing-naming
  180.         disabled: true
  181.       - name: deep-exit
  182.         disabled: true
  183.  
  184.   gosimple:
  185.     checks:
  186.      - "all"
  187.       - "-S1008"
  188.  
  189.   stylecheck:
  190.     checks:
  191.      - "all"
  192.       - "-ST1003" # Poorly chosen identifier. Like camel_case
  193.  
  194.   nestif:
  195.     min-complexity: 7
  196.  
  197.   cyclop:
  198.    # Default: 10
  199.     max-complexity: 15
  200.  
  201.   gocritic:
  202.     enable-all: true
  203.     disabled-checks:
  204.      - hugeParam
  205.       - rangeValCopy
  206.       - importShadow
  207.  
  208. issues:
  209.   max-same-issues: 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement