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