| 1 | version: "2" |
| 2 | |
| 3 | run: |
| 4 | tests: true |
| 5 | go: "1.26" |
| 6 | |
| 7 | formatters: |
| 8 | enable: [goimports] |
| 9 | settings: |
| 10 | goimports: |
| 11 | local-prefixes: [github.com/gosuda/portal/v2] |
| 12 | |
| 13 | linters: |
| 14 | default: none |
| 15 | enable: |
| 16 | - govet |
| 17 | - errcheck |
| 18 | - staticcheck |
| 19 | - unused |
| 20 | - errorlint |
| 21 | - copyloopvar |
| 22 | - nilerr |
| 23 | - bodyclose |
| 24 | - sqlclosecheck |
| 25 | - rowserrcheck |
| 26 | - durationcheck |
| 27 | - noctx |
| 28 | - wastedassign |
| 29 | |
| 30 | exclusions: |
| 31 | paths: |
| 32 | - ^frontend/node_modules/ |
| 33 | - ^cmd/relay-server/dist/ |
| 34 | rules: |
| 35 | - linters: [errcheck] |
| 36 | source: "^\\s*defer\\s+" |
| 37 | - path: "_test\\.go" |
| 38 | linters: [bodyclose, errcheck, noctx] |
| 39 | |
| 40 | settings: |
| 41 | errcheck: |
| 42 | check-blank: false |
| 43 | check-type-assertions: false |
| 44 | exclude-functions: |
| 45 | - fmt.Printf |
| 46 | - fmt.Println |
| 47 | - fmt.Print |
| 48 | - fmt.Fprintf |
| 49 | - fmt.Fprint |
| 50 | - fmt.Fprintln |
| 51 | - fmt.Sprintf |
| 52 | - os.Unsetenv |
| 53 | - encoding/json.Marshal |
| 54 | - encoding/json.Unmarshal |
| 55 | - io.Copy |
| 56 | - log.Printf |
| 57 | - log.Println |
| 58 | - log.Print |
| 59 | - time.Now |
| 60 | - time.Sleep |
| 61 | |
| 62 | issues: |
| 63 | max-issues-per-linter: 0 |
| 64 | max-same-issues: 0 |