.golangci.yaml 2.1 KB

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