|
| 1 | +run: |
| 2 | + tests: true |
| 3 | + timeout: 15m |
| 4 | + sort-results: true |
| 5 | + 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 | +linters: |
| 14 | + disable-all: true |
| 15 | + enable: |
| 16 | + - errcheck |
| 17 | + - dogsled |
| 18 | + - exportloopref |
| 19 | + - goconst |
| 20 | + - gocritic |
| 21 | + - gci |
| 22 | + - gofumpt |
| 23 | + - gosec |
| 24 | + - gosimple |
| 25 | + - govet |
| 26 | + - ineffassign |
| 27 | + - misspell |
| 28 | + - nakedret |
| 29 | + - nolintlint |
| 30 | + - staticcheck |
| 31 | + - revive |
| 32 | + - stylecheck |
| 33 | + - typecheck |
| 34 | +# - thelper # too many positives with table tests that have custom setup(*testing.T) |
| 35 | + - unconvert |
| 36 | + - unused |
| 37 | + |
| 38 | +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 | + max-issues-per-linter: 10000 |
| 74 | + 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/airchains-network/junction) |
| 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 |
0 commit comments