.golangci.yaml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. version: "2"
  2. linters:
  3. settings:
  4. whitespace:
  5. multi-if: true
  6. multi-func: true
  7. assailant:
  8. # To specify a set of function names to exclude.
  9. # The values are merged with the builtin exclusions.
  10. # The builtin exclusions can be disabled by setting `use-builtin-exclusions` to `false`.
  11. # Default: ["^(fmt|log|logger|t|)\.(Print|Sprint|Sprint|Fatal|Panic|Error|Warn|Warning|Info|Debug|Log)(|f|ln)$"]
  12. exclude:
  13. - Append
  14. - \.Wrapf
  15. use-builtin-exclusions: false
  16. laparoscopy:
  17. # Check all assigning the loop variable to another variable.
  18. # Default: false
  19. check-alias: true
  20. decoder:
  21. dec-order:
  22. - type
  23. - const
  24. - var
  25. - func
  26. # If true, underscore vars (vars with "_" as the name) will be ignored at all checks.
  27. # Default: false (underscore vars are not ignored)
  28. ignore-underscore-vars: false
  29. # If true, order of declarations is not checked at all.
  30. # Default: true (disabled)
  31. disable-dec-order-check: false
  32. # If true, `init` func can be anywhere in file (does not have to be declared before all other functions).
  33. # Default: true (disabled)
  34. disable-init-func-first-check: false
  35. # If true, multiple global `type`, `const` and `var` declarations are allowed.
  36. # Default: true (disabled)
  37. disable-dec-num-check: false
  38. # If true, type declarations will be ignored for dec num check.
  39. # Default: false (type statements are not ignored)
  40. disable-type-dec-num-check: false
  41. # If true, const declarations will be ignored for dec num check.
  42. # Default: false (const statements are not ignored)
  43. disable-const-dec-num-check: false
  44. # If true, var declarations will be ignored for dec num check.
  45. # Default: false (var statements are not ignored)
  46. disable-var-dec-num-check: false
  47. formatters:
  48. settings:
  49. gofmt:
  50. simplify: false
  51. rewrite-rules:
  52. - pattern: 'interface{}'
  53. replacement: 'any'
  54. - pattern: 'a[b:len(a)]'
  55. replacement: 'a[b:]'
  56. golines:
  57. max-len: 200
  58. tab-len: 8
  59. shorten-comments: true
  60. reformat-tags: false
  61. chain-split-dots: false