go-transaction-manager

Форк
0
/
.golangci.yml 
132 строки · 3.6 Кб
1
linters:
2
  enable:
3
    - asasalint
4
    - bodyclose
5
    - containedctx
6
    - contextcheck
7
    - dogsled
8
    - dupl
9
    - durationcheck
10
    - errchkjson
11
    - errname
12
    - errorlint
13
    - exhaustive
14
    - exhaustruct
15
    - exportloopref # https://github.com/kyoh86/exportloopref#whats-this
16
    - forcetypeassert # https://github.com/gostaticanalysis/forcetypeassert#forcetypeassert
17
    - funlen
18
    - gochecknoglobals
19
    - gochecknoinits
20
    - gocognit
21
    - goconst
22
    - gocritic
23
    - gocyclo
24
    - godot
25
    - err113
26
    - gofmt
27
    - gofumpt
28
    - goimports
29
    - gomoddirectives
30
    - goprintffuncname # https://github.com/jirfag/go-printf-func-name#go-printf-func-name
31
    - grouper
32
    - gosec
33
    - importas
34
    - interfacebloat
35
    - ireturn
36
    - lll
37
    - makezero # https://github.com/ashanbrown/makezero#purpose
38
    - misspell
39
    - nakedret
40
    - nestif
41
    - nilerr # https://github.com/gostaticanalysis/nilerr#nilerr
42
    - nilnil # https://github.com/Antonboom/nilnil#motivation
43
    - nolintlint # https://github.com/golangci/golangci-lint/blob/master/pkg/golinters/nolintlint/README.md#purpose
44
    - paralleltest
45
    - prealloc # https://github.com/alexkohler/prealloc#purpose
46
    - revive
47
    - rowserrcheck
48
    - sqlclosecheck
49
    - stylecheck
50
    - tagliatelle
51
    - tparallel # https://github.com/moricho/tparallel
52
    - unconvert # https://github.com/mdempsky/unconvert#usage
53
    - unparam
54
    - usestdlibvars
55
    - wastedassign
56
    - whitespace
57
    - wsl # https://github.com/bombsimon/wsl/blob/master/doc/rules.md
58

59
linters-settings:
60
  wsl:
61
    allow-assign-and-anything: true
62

63
issues:
64
  exclude-dirs:
65
    - trm/manager/mock
66
    - sql/mock
67
  exclude-use-default: false
68
  exclude:
69
    - ST1000 # ST1000: at least one file in a package should have a package comment
70
  exclude-rules:
71
    - linters:
72
        - lll
73
      source: "^//go:generate "
74
    - linters:
75
        - lll
76
      source: "(?:http(s)?:\\/\\/)?[\\w.-]+(?:\\.[\\w\\.-]+)+[\\w\\-\\._~:/?#[\\]@!\\$&'\\(\\)\\*\\+,;=.]+"
77
    - linters:
78
        - lll
79
      source: "// ?TODO "
80
    - path: _test\.go
81
      linters:
82
        - wsl
83
      text: "only cuddled expressions if assigning variable or using from line above"
84
    - path: _test\.go
85
      linters:
86
        - wsl
87
      text: "assignments should only be cuddled with other assignments"
88
    - path: _test\.go
89
      linters:
90
        - revive
91
      text: "seems to be unused, consider removing or renaming it as _"
92
    - path: _test\.go
93
      linters:
94
        - revive
95
      text: "context-keys-type: should not use basic type string as key in context.WithValue"
96
    - path: _test\.go
97
      linters:
98
        - staticcheck
99
      text: "SA1029: should not use built-in type string as key for value; define your own type to avoid collisions"
100
    - path: (.+/)?context\.go
101
      linters:
102
        - ireturn
103
    - path: (.+/)?transaction\.go
104
      linters:
105
        - ireturn
106
      source: \) Begin\(ctx
107
    - path: (.+/)?settings\.go
108
      linters:
109
        - ireturn
110
      source: "(?:EnrichBy|SetPropagation|SetCtxKey|CtxKey|SetCancelable|SetTimeout)"
111
    - linters:
112
        - gochecknoglobals
113
      source: "DefaultCtxGetter"
114
    - &internal_text
115
      path: (^trm/internal|^internal)
116
      text: "var-naming: don't use an underscore in package name"
117
    - <<: *internal_text
118
      text: "package-comments: should have a package comment"
119
    - <<: *internal_text
120
      text: "ST1003: should not use underscores in package names"
121
    - path: (_test\.go|^trm/internal|^internal)
122
      linters:
123
        - funlen
124
        - gochecknoglobals
125
        - goconst
126
        - gomnd
127
        - containedctx
128
        - err113
129
        - errcheck
130
        - nolintlint
131
        - forcetypeassert
132
        - exhaustruct

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.