.golangci.yml 1.7 KB

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