|
| 1 | +version: "2" |
1 | 2 | run: |
2 | 3 | tests: true |
3 | | - timeout: 15m |
4 | | - sort-results: true |
5 | 4 | allow-parallel-runners: true |
6 | | - exclude-dir: testutil/testdata |
7 | | - skip-files: |
8 | | - - server/grpc/gogoreflection/fix_registration.go |
9 | | - - ".*\\.pb\\.go$" |
10 | | - - ".*\\.pb\\.gw\\.\\.go$" |
11 | | - - ".*\\.pulsar\\.go$" |
12 | | - |
13 | 5 | linters: |
14 | | - disable-all: true |
| 6 | + default: none |
15 | 7 | enable: |
16 | | - - errcheck |
| 8 | + - copyloopvar |
17 | 9 | - dogsled |
18 | | - - exportloopref |
| 10 | + - errcheck |
19 | 11 | - goconst |
20 | 12 | - gocritic |
21 | | - - gci |
22 | | - - gofumpt |
23 | 13 | - gosec |
24 | | - - gosimple |
25 | 14 | - govet |
26 | 15 | - ineffassign |
27 | 16 | - misspell |
28 | 17 | - nakedret |
29 | 18 | - nolintlint |
30 | | - - staticcheck |
31 | 19 | - revive |
32 | | - - stylecheck |
33 | | - - typecheck |
34 | | -# - thelper # too many positives with table tests that have custom setup(*testing.T) |
| 20 | + - staticcheck |
| 21 | + # - thelper # too many positives with table tests that have custom setup(*testing.T) |
35 | 22 | - unconvert |
36 | 23 | - unused |
37 | | - |
| 24 | + settings: |
| 25 | + dogsled: |
| 26 | + max-blank-identifiers: 6 |
| 27 | + gocritic: |
| 28 | + disabled-checks: |
| 29 | + - regexpMust |
| 30 | + - appendAssign |
| 31 | + - ifElseChain |
| 32 | + gosec: |
| 33 | + # To select a subset of rules to run. |
| 34 | + # Available rules: https://github.com/securego/gosec#available-rules |
| 35 | + # Default: [] - means include all rules |
| 36 | + includes: |
| 37 | + # - G101 # Look for hard coded credentials |
| 38 | + - G102 # Bind to all interfaces |
| 39 | + - G103 # Audit the use of unsafe block |
| 40 | + - G104 # Audit errors not checked |
| 41 | + - G106 # Audit the use of ssh.InsecureIgnoreHostKey |
| 42 | + - G107 # Url provided to HTTP request as taint input |
| 43 | + - G108 # Profiling endpoint automatically exposed on /debug/pprof |
| 44 | + - G109 # Potential Integer overflow made by strconv.Atoi result conversion to int16/32 |
| 45 | + - G110 # Potential DoS vulnerability via decompression bomb |
| 46 | + - G111 # Potential directory traversal |
| 47 | + - G112 # Potential slowloris attack |
| 48 | + - G113 # Usage of Rat.SetString in math/big with an overflow (CVE-2022-23772) |
| 49 | + - G114 # Use of net/http serve function that has no support for setting timeouts |
| 50 | + - G201 # SQL query construction using format string |
| 51 | + - G202 # SQL query construction using string concatenation |
| 52 | + - G203 # Use of unescaped data in HTML templates |
| 53 | + - G204 # Audit use of command execution |
| 54 | + - G301 # Poor file permissions used when creating a directory |
| 55 | + - G302 # Poor file permissions used with chmod |
| 56 | + - G303 # Creating tempfile using a predictable path |
| 57 | + - G304 # File path provided as taint input |
| 58 | + - G305 # File traversal when extracting zip/tar archive |
| 59 | + - G306 # Poor file permissions used when writing to a new file |
| 60 | + - G307 # Deferring a method which returns an error |
| 61 | + - G401 # Detect the usage of DES, RC4, MD5 or SHA1 |
| 62 | + - G402 # Look for bad TLS connection settings |
| 63 | + - G403 # Ensure minimum RSA key length of 2048 bits |
| 64 | + - G404 # Insecure random number source (rand) |
| 65 | + - G501 # Import blocklist: crypto/md5 |
| 66 | + - G502 # Import blocklist: crypto/des |
| 67 | + - G503 # Import blocklist: crypto/rc4 |
| 68 | + - G504 # Import blocklist: net/http/cgi |
| 69 | + - G505 # Import blocklist: crypto/sha1 |
| 70 | + - G601 # Implicit memory aliasing of items from a range statement |
| 71 | + misspell: |
| 72 | + locale: US |
| 73 | + nolintlint: |
| 74 | + require-explanation: false |
| 75 | + require-specific: false |
| 76 | + allow-unused: false |
| 77 | + revive: |
| 78 | + rules: |
| 79 | + - name: redefines-builtin-id |
| 80 | + disabled: true |
| 81 | + staticcheck: |
| 82 | + checks: |
| 83 | + - all |
| 84 | + exclusions: |
| 85 | + generated: lax |
| 86 | + presets: |
| 87 | + - comments |
| 88 | + - common-false-positives |
| 89 | + - legacy |
| 90 | + - std-error-handling |
| 91 | + rules: |
| 92 | + - linters: |
| 93 | + - gosec |
| 94 | + text: Use of weak random number generator |
| 95 | + - linters: |
| 96 | + - staticcheck |
| 97 | + text: "ST1003:" |
| 98 | + # FIXME: Disabled until golangci-lint updates stylecheck with this fix: |
| 99 | + # https://github.com/dominikh/go-tools/issues/389 |
| 100 | + - linters: |
| 101 | + - staticcheck |
| 102 | + text: "ST1016:" |
| 103 | + - linters: |
| 104 | + - staticcheck |
| 105 | + path: migrations |
| 106 | + text: "SA1019:" |
| 107 | + - linters: |
| 108 | + - staticcheck |
| 109 | + text: "SA1019: codec.NewAminoCodec is deprecated" # TODO remove once migration path is set out |
| 110 | + - linters: |
| 111 | + - staticcheck |
| 112 | + text: "SA1019: legacybech32.MustMarshalPubKey" # TODO remove once ready to remove from the sdk |
| 113 | + - linters: |
| 114 | + - staticcheck |
| 115 | + text: "SA1019: legacybech32.MarshalPubKey" # TODO remove once ready to remove from the sdk |
| 116 | + - linters: |
| 117 | + - staticcheck |
| 118 | + text: "SA1019: legacybech32.UnmarshalPubKey" # TODO remove once ready to remove from the sdk |
| 119 | + - linters: |
| 120 | + - staticcheck |
| 121 | + text: "SA1019: params.SendEnabled is deprecated" # TODO remove once ready to remove from the sdk |
| 122 | + - linters: |
| 123 | + - nolintlint |
| 124 | + text: leading space |
| 125 | + paths: |
| 126 | + - server/grpc/gogoreflection/fix_registration.go |
| 127 | + - .*\.pb\.go$ |
| 128 | + - .*\.pb\.gw\.\.go$ |
| 129 | + - .*\.pulsar\.go$ |
| 130 | + - testutil/testdata |
| 131 | + - third_party$ |
| 132 | + - builtin$ |
| 133 | + - examples$ |
38 | 134 | issues: |
39 | | - exclude-rules: |
40 | | - - text: 'Use of weak random number generator' |
41 | | - linters: |
42 | | - - gosec |
43 | | - - text: 'ST1003:' |
44 | | - linters: |
45 | | - - stylecheck |
46 | | - # FIXME: Disabled until golangci-lint updates stylecheck with this fix: |
47 | | - # https://github.com/dominikh/go-tools/issues/389 |
48 | | - - text: 'ST1016:' |
49 | | - linters: |
50 | | - - stylecheck |
51 | | - - path: 'migrations' |
52 | | - text: 'SA1019:' |
53 | | - linters: |
54 | | - - staticcheck |
55 | | - - text: 'SA1019: codec.NewAminoCodec is deprecated' # TODO remove once migration path is set out |
56 | | - linters: |
57 | | - - staticcheck |
58 | | - - text: 'SA1019: legacybech32.MustMarshalPubKey' # TODO remove once ready to remove from the sdk |
59 | | - linters: |
60 | | - - staticcheck |
61 | | - - text: 'SA1019: legacybech32.MarshalPubKey' # TODO remove once ready to remove from the sdk |
62 | | - linters: |
63 | | - - staticcheck |
64 | | - - text: 'SA1019: legacybech32.UnmarshalPubKey' # TODO remove once ready to remove from the sdk |
65 | | - linters: |
66 | | - - staticcheck |
67 | | - - text: 'SA1019: params.SendEnabled is deprecated' # TODO remove once ready to remove from the sdk |
68 | | - linters: |
69 | | - - staticcheck |
70 | | - - text: 'leading space' |
71 | | - linters: |
72 | | - - nolintlint |
73 | 135 | max-issues-per-linter: 10000 |
74 | 136 | max-same-issues: 10000 |
75 | | - |
76 | | -linters-settings: |
77 | | - gci: |
78 | | - custom-order: true |
79 | | - sections: |
80 | | - - standard # Standard section: captures all standard packages. |
81 | | - - default # Default section: contains all imports that could not be matched to another section type. |
82 | | - - prefix(cosmossdk.io) |
83 | | - - prefix(github.com/cosmos/cosmos-sdk) |
84 | | - - prefix(github.com/CosmWasm/wasmd) |
85 | | - revive: |
86 | | - rules: |
87 | | - - name: redefines-builtin-id |
88 | | - disabled: true |
89 | | - |
90 | | - gosec: |
91 | | - # To select a subset of rules to run. |
92 | | - # Available rules: https://github.com/securego/gosec#available-rules |
93 | | - # Default: [] - means include all rules |
94 | | - includes: |
95 | | - # - G101 # Look for hard coded credentials |
96 | | - - G102 # Bind to all interfaces |
97 | | - - G103 # Audit the use of unsafe block |
98 | | - - G104 # Audit errors not checked |
99 | | - - G106 # Audit the use of ssh.InsecureIgnoreHostKey |
100 | | - - G107 # Url provided to HTTP request as taint input |
101 | | - - G108 # Profiling endpoint automatically exposed on /debug/pprof |
102 | | - - G109 # Potential Integer overflow made by strconv.Atoi result conversion to int16/32 |
103 | | - - G110 # Potential DoS vulnerability via decompression bomb |
104 | | - - G111 # Potential directory traversal |
105 | | - - G112 # Potential slowloris attack |
106 | | - - G113 # Usage of Rat.SetString in math/big with an overflow (CVE-2022-23772) |
107 | | - - G114 # Use of net/http serve function that has no support for setting timeouts |
108 | | - - G201 # SQL query construction using format string |
109 | | - - G202 # SQL query construction using string concatenation |
110 | | - - G203 # Use of unescaped data in HTML templates |
111 | | - - G204 # Audit use of command execution |
112 | | - - G301 # Poor file permissions used when creating a directory |
113 | | - - G302 # Poor file permissions used with chmod |
114 | | - - G303 # Creating tempfile using a predictable path |
115 | | - - G304 # File path provided as taint input |
116 | | - - G305 # File traversal when extracting zip/tar archive |
117 | | - - G306 # Poor file permissions used when writing to a new file |
118 | | - - G307 # Deferring a method which returns an error |
119 | | - - G401 # Detect the usage of DES, RC4, MD5 or SHA1 |
120 | | - - G402 # Look for bad TLS connection settings |
121 | | - - G403 # Ensure minimum RSA key length of 2048 bits |
122 | | - - G404 # Insecure random number source (rand) |
123 | | - - G501 # Import blocklist: crypto/md5 |
124 | | - - G502 # Import blocklist: crypto/des |
125 | | - - G503 # Import blocklist: crypto/rc4 |
126 | | - - G504 # Import blocklist: net/http/cgi |
127 | | - - G505 # Import blocklist: crypto/sha1 |
128 | | - - G601 # Implicit memory aliasing of items from a range statement |
129 | | - misspell: |
130 | | - locale: US |
131 | | - gofumpt: |
132 | | - extra-rules: true |
133 | | - dogsled: |
134 | | - max-blank-identifiers: 6 |
135 | | - maligned: |
136 | | - suggest-new: true |
137 | | - nolintlint: |
138 | | - allow-unused: false |
139 | | - allow-leading-space: true |
140 | | - require-explanation: false |
141 | | - require-specific: false |
142 | | - gosimple: |
143 | | - checks: ['all'] |
144 | | - gocritic: |
145 | | - disabled-checks: |
146 | | - - regexpMust |
147 | | - - appendAssign |
148 | | - - ifElseChain |
| 137 | +formatters: |
| 138 | + enable: |
| 139 | + - gci |
| 140 | + - gofumpt |
| 141 | + settings: |
| 142 | + gci: |
| 143 | + sections: |
| 144 | + - standard # Standard section: captures all standard packages. |
| 145 | + - default # Default section: contains all imports that could not be matched to another section type. |
| 146 | + - prefix(cosmossdk.io) |
| 147 | + - prefix(github.com/cosmos/cosmos-sdk) |
| 148 | + - prefix(github.com/CosmWasm/wasmd) |
| 149 | + custom-order: true |
| 150 | + gofumpt: |
| 151 | + extra-rules: true |
| 152 | + exclusions: |
| 153 | + generated: lax |
| 154 | + paths: |
| 155 | + - server/grpc/gogoreflection/fix_registration.go |
| 156 | + - .*\.pb\.go$ |
| 157 | + - .*\.pb\.gw\.\.go$ |
| 158 | + - .*\.pulsar\.go$ |
| 159 | + - testutil/testdata |
| 160 | + - third_party$ |
| 161 | + - builtin$ |
| 162 | + - examples$ |
0 commit comments