github.com/erda-project/erda-infra@v1.0.10-0.20240327085753-f3a249292aeb/.golangci.yml (about) 1 run: 2 concurrency: 4 3 timeout: 2m 4 modules-download-mode: mod 5 # include test files or not, default is true 6 tests: false 7 allow-parallel-runners: true 8 skip-dirs: 9 - tools 10 - examples 11 skip-files: 12 13 linters-settings: 14 goimports: 15 # local-prefixes: github.com/erda-project/erda-infra 16 17 linters: 18 disable-all: true 19 # 修复完 issues 后再增加新的 linter 20 enable: 21 - goimports 22 - gosec 23 - gofmt 24 25 issues: 26 exclude-rules: 27 - linters: 28 - gosec 29 text: "G101:" # G101: Potential hardcoded credentials (gosec) 30 - linters: 31 - gosec 32 text: "G108:" # G108: Profiling endpoint is automatically exposed on /debug/pprof (gosec) 33 - linters: 34 - gosec 35 text: "G109:" # G109: Potential Integer overflow made by strconv.Atoi result conversion to int16/32 (gosec) 36 - linters: 37 - gosec 38 text: "G110:" # G110: Potential DoS vulnerability via decompression bomb (gosec) 39 - linters: 40 - gosec 41 text: "G204:" # G204: Subprocess launched with function call as argument or cmd arguments (gosec) 42 - linters: 43 - gosec 44 text: "G306:" # G306: Expect WriteFile permissions to be 0600 or less 45 - linters: 46 - gosec 47 text: "G402:" # G402: TLS InsecureSkipVerify may be true. (gosec) 48 - linters: 49 - gosec 50 text: "G404:" # G404: Use of weak random number generator (math/rand instead of crypto/rand) (gosec) 51 - linters: 52 - gosec 53 text: "G601:" # G601: Implicit memory aliasing in for loop. (gosec)