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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. # This file contains all available configuration options
  2. # with their default values.
  3. # options for analysis running
  4. run:
  5. # default concurrency is a available CPU number
  6. concurrency: 4
  7. # timeout for analysis, e.g. 30s, 5m, default is 1m
  8. timeout: 10m
  9. # exit code when at least one issue was found, default is 1
  10. issues-exit-code: 1
  11. issues:
  12. # Which dirs to exclude: issues from them won't be reported.
  13. # Can use regexp here: `generated.*`, regexp is applied on full path,
  14. # including the path prefix if one is set.
  15. # Default dirs are skipped independently of this option's value (see exclude-dirs-use-default).
  16. # "/" will be replaced by current OS file path separator to properly work on Windows.
  17. # Default: []
  18. exclude-dirs:
  19. - vendor
  20. - fake
  21. - externalversions
  22. exclude-dirs-use-default: true
  23. # output configuration options
  24. output:
  25. # The formats used to render issues.
  26. # Formats:
  27. # - `colored-line-number`
  28. # - `line-number`
  29. # - `json`
  30. # - `colored-tab`
  31. # - `tab`
  32. # - `html`
  33. # - `checkstyle`
  34. # - `code-climate`
  35. # - `junit-xml`
  36. # - `junit-xml-extended`
  37. # - `github-actions`
  38. # - `teamcity`
  39. # - `sarif`
  40. # Output path can be either `stdout`, `stderr` or path to the file to write to.
  41. #
  42. # For the CLI flag (`--out-format`), multiple formats can be specified by separating them by comma.
  43. # The output can be specified for each of them by separating format name and path by colon symbol.
  44. # Example: "--out-format=checkstyle:report.xml,json:stdout,colored-line-number"
  45. # The CLI flag (`--out-format`) override the configuration file.
  46. #
  47. # Default:
  48. # formats:
  49. # - format: colored-line-number
  50. # path: stdout
  51. formats:
  52. - format: colored-line-number
  53. # print lines of code with issue, default is true
  54. print-issued-lines: true
  55. # print linter name in the end of issue text, default is true
  56. print-linter-name: true
  57. # make issues output unique by line, default is true
  58. uniq-by-line: true
  59. linters-settings:
  60. misspell:
  61. ignore-words:
  62. - mosquitto
  63. revive:
  64. rules:
  65. - name: unused-parameter
  66. severity: warning
  67. disabled: true
  68. - name: unused-receiver
  69. severity: warning
  70. disabled: true
  71. linters:
  72. disable-all: true
  73. enable:
  74. - goconst
  75. - gofmt
  76. - revive
  77. - gosimple
  78. - govet
  79. - misspell
  80. - whitespace