.golangci.yml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. run:
  2. concurrency: 2
  3. timeout: 10m
  4. linters:
  5. enable-all: false
  6. disable-all: true
  7. enable:
  8. - depguard
  9. - errcheck
  10. - gocritic
  11. - gocyclo
  12. - gofmt
  13. - goimports
  14. - gomodguard
  15. - revive
  16. - gosimple
  17. - govet
  18. - ineffassign
  19. - lll
  20. - misspell
  21. - nakedret
  22. - nolintlint
  23. - staticcheck
  24. - typecheck
  25. - unconvert
  26. - unparam
  27. - unused
  28. linters-settings:
  29. revive:
  30. rules:
  31. - name: package-comments
  32. disabled: true
  33. depguard:
  34. rules:
  35. all:
  36. deny:
  37. - pkg: io/ioutil
  38. desc: 'io/ioutil package has been deprecated'
  39. - pkg: gopkg.in/yaml.v2
  40. desc: 'compose-go uses yaml.v3'
  41. gomodguard:
  42. blocked:
  43. versions:
  44. - github.com/distribution/distribution:
  45. reason: "use distribution/reference"
  46. - gotest.tools:
  47. version: "< 3.0.0"
  48. reason: "deprecated, pre-modules version"
  49. gocritic:
  50. # Enable multiple checks by tags, run `GL_DEBUG=gocritic golangci-lint run` to see all tags and checks.
  51. # Empty list by default. See https://github.com/go-critic/go-critic#usage -> section "Tags".
  52. enabled-tags:
  53. - diagnostic
  54. - opinionated
  55. - style
  56. disabled-checks:
  57. - paramTypeCombine
  58. - unnamedResult
  59. - whyNoLint
  60. gocyclo:
  61. min-complexity: 16
  62. lll:
  63. line-length: 200
  64. issues:
  65. # golangci hides some golint warnings (the warning about exported things
  66. # withtout documentation for example), this will make it show them anyway.
  67. exclude-use-default: false