.golangci.yml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. linters-settings:
  2. govet:
  3. check-shadowing: true
  4. golint:
  5. min-confidence: 0
  6. gocyclo:
  7. min-complexity: 15
  8. maligned:
  9. suggest-new: true
  10. dupl:
  11. threshold: 100
  12. goconst:
  13. min-len: 2
  14. min-occurrences: 2
  15. misspell:
  16. locale: US
  17. lll:
  18. line-length: 140
  19. goimports:
  20. local-prefixes: github.com/pion
  21. gocritic:
  22. enabled-tags:
  23. - performance
  24. - style
  25. - experimental
  26. disabled-checks:
  27. - commentedOutCode
  28. - sloppyReassign
  29. issues:
  30. exclude:
  31. - "`assertHMACSize` - `blocksize` always receives `64`"
  32. exclude-rules:
  33. - text: "string `<nil>`"
  34. linters:
  35. - goconst
  36. # Exclude some linters from running on tests files.
  37. - path: _test\.go
  38. linters:
  39. - gocyclo
  40. - errcheck
  41. - dupl
  42. - gosec
  43. - goconst
  44. # Ease some gocritic warnings on test files.
  45. - path: _test\.go
  46. text: "(unnamedResult|exitAfterDefer|unlambda)"
  47. linters:
  48. - gocritic
  49. # Exclude known linters from partially hard-vendored code,
  50. # which is impossible to exclude via "nolint" comments.
  51. - path: internal/hmac/
  52. text: "weak cryptographic primitive"
  53. linters:
  54. - gosec
  55. - path: internal/hmac/
  56. text: "Write\\` is not checked"
  57. linters:
  58. - errcheck
  59. # Ease linting on benchmarking code.
  60. - path: cmd/stun-bench/
  61. linters:
  62. - gosec
  63. - errcheck
  64. - unparam
  65. - path: ^cmd/
  66. linters:
  67. - gocyclo
  68. - path: ^cmd/
  69. text: "(unnamedResult|exitAfterDefer)"
  70. linters:
  71. - gocritic
  72. linters:
  73. enable-all: true
  74. disable:
  75. - funlen
  76. - gochecknoglobals
  77. - godox
  78. - prealloc
  79. - scopelint
  80. run:
  81. skip-dirs:
  82. - e2e
  83. - fuzz
  84. - testdata
  85. - api