.golangci.yml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. linters:
  2. enable:
  3. # Default linters, plus these:
  4. - exportloopref
  5. - gocognit
  6. - goconst
  7. - gocritic
  8. - gofmt
  9. - gosec
  10. - misspell
  11. - paralleltest
  12. - revive
  13. linters-settings:
  14. govet:
  15. enable:
  16. - fieldalignment
  17. issues:
  18. exclude:
  19. # Disable scopelint errors on table driven tests
  20. - Using the variable on range scope `tc` in function literal
  21. # Disable documenting fstest Test functions
  22. - exported function Test\S* should have comment or be unexported
  23. - comment on exported function Test\S* should be of the form
  24. exclude-rules:
  25. - path: '(.+)_test\.go|^fstest/' # Disable some lint failures on test files and packages.
  26. linters:
  27. - govet
  28. text: 'fieldalignment: struct with .* bytes could be .*' # Govet's fieldalignment memory size check on table-driven test case types requires field reordering to improve performance, which can lower readability without a meaningful impact to non-test code.
  29. include:
  30. # Re-enable default excluded rules
  31. - EXC0001
  32. - EXC0002
  33. - EXC0012
  34. - EXC0013
  35. - EXC0014
  36. - EXC0015