You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

.golangci.yml 2.3 kB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. #
  2. # Licensed to the Apache Software Foundation (ASF) under one or more
  3. # contributor license agreements. See the NOTICE file distributed with
  4. # this work for additional information regarding copyright ownership.
  5. # The ASF licenses this file to You under the Apache License, Version 2.0
  6. # (the "License"); you may not use this file except in compliance with
  7. # the License. You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. #
  17. linters-settings:
  18. govet:
  19. shadow: true
  20. golint:
  21. min-confidence: 0
  22. gocyclo:
  23. min-complexity: 10
  24. maligned:
  25. suggest-new: true
  26. dupl:
  27. threshold: 100
  28. goconst:
  29. min-len: 2
  30. min-occurrences: 2
  31. depguard:
  32. list-type: blacklist
  33. packages:
  34. # logging is allowed only by logutils.Log, logrus
  35. # is allowed to use only in logutils package
  36. - github.com/sirupsen/logrus
  37. misspell:
  38. locale: US
  39. lll:
  40. line-length: 140
  41. goimports:
  42. local-prefixes: github.com/golangci/golangci-lint
  43. gocritic:
  44. enabled-tags:
  45. - performance
  46. - style
  47. - experimental
  48. disabled-checks:
  49. - wrapperFunc
  50. linters:
  51. disable-all: true
  52. enable:
  53. - govet
  54. - staticcheck
  55. - ineffassign
  56. - misspell
  57. - asciicheck
  58. - bodyclose
  59. - rowserrcheck
  60. - gofmt
  61. - durationcheck
  62. - sqlclosecheck
  63. run:
  64. issues:
  65. exclude-dirs:
  66. - test/testdata_etc
  67. - pkg/golinters/goanalysis/(checker|passes)
  68. exclude-rules:
  69. - text: "weak cryptographic primitive"
  70. linters:
  71. - gosec
  72. - linters:
  73. - staticcheck
  74. text: "SA1019:"
  75. - path: _test\.go
  76. linters:
  77. - errcheck
  78. - gosec
  79. - rowserrcheck
  80. - govet
  81. # golangci.com configuration
  82. # https://github.com/golangci/golangci/wiki/Configuration
  83. service:
  84. golangci-lint-version: 1.57.x # use the fixed version to not introduce new linters unexpectedly
  85. prepare:
  86. - echo "here I can run custom commands, but no preparation needed for this repo"