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.1 kB

3 years ago
3 years ago
3 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. check-shadowing: false
  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. run:
  58. skip-dirs:
  59. - test/testdata_etc
  60. - pkg/golinters/goanalysis/(checker|passes)
  61. issues:
  62. exclude-rules:
  63. - text: "weak cryptographic primitive"
  64. linters:
  65. - gosec
  66. - linters:
  67. - staticcheck
  68. text: "SA1019:"
  69. # golangci.com configuration
  70. # https://github.com/golangci/golangci/wiki/Configuration
  71. service:
  72. golangci-lint-version: 1.49.x # use the fixed version to not introduce new linters unexpectedly
  73. prepare:
  74. - echo "here I can run custom commands, but no preparation needed for this repo"