|
1 | | -version: '2' |
| 1 | +version: "2" |
2 | 2 | linters: |
| 3 | + enable: |
| 4 | + - depguard |
| 5 | + - errcheck |
| 6 | + - ginkgolinter |
| 7 | + - gocritic |
| 8 | + - godot |
| 9 | + - gosec |
| 10 | + - govet |
| 11 | + - ineffassign |
| 12 | + - misspell |
| 13 | + - musttag |
| 14 | + - nolintlint |
| 15 | + - revive |
| 16 | + - sloglint |
| 17 | + - staticcheck |
| 18 | + - unused |
3 | 19 | settings: |
4 | | - govet: |
5 | | - disable: |
6 | | - - structtag # participle uses nonconventional tags |
| 20 | + depguard: |
| 21 | + rules: |
| 22 | + lsp: |
| 23 | + files: ["${base-path}/internal/lsp/*"] |
| 24 | + deny: |
| 25 | + - pkg: github.com/armsnyder/gdshader-language-server/internal/ast |
| 26 | + desc: lsp and ast packages should not depend on each other |
| 27 | + - pkg: github.com/armsnyder/gdshader-language-server/internal/app |
| 28 | + desc: Library packages should not depend on app package |
| 29 | + ast: |
| 30 | + files: ["${base-path}/internal/ast/*"] |
| 31 | + deny: |
| 32 | + - pkg: github.com/armsnyder/gdshader-language-server/internal/lsp |
| 33 | + desc: lsp and ast packages should not depend on each other |
| 34 | + - pkg: github.com/armsnyder/gdshader-language-server/internal/app |
| 35 | + desc: Library packages should not depend on app package |
| 36 | + production: |
| 37 | + files: ["!**/*_test.go"] |
| 38 | + deny: |
| 39 | + - pkg: github.com/armsnyder/gdshader-language-server/internal/testutil |
| 40 | + desc: Test utilities should not be used in production code |
| 41 | + gocritic: |
| 42 | + enable-all: true |
| 43 | + disabled-checks: |
| 44 | + - whyNoLint |
| 45 | + revive: |
| 46 | + enable-all-rules: true |
| 47 | + rules: |
| 48 | + - name: add-constant |
| 49 | + disabled: true # Too strict |
| 50 | + - name: cognitive-complexity |
| 51 | + arguments: [15] # Default 7 |
| 52 | + - name: cyclomatic |
| 53 | + arguments: [15] # Default 10 |
| 54 | + - name: line-length-limit |
| 55 | + disabled: true # Too strict |
| 56 | + - name: max-public-structs |
| 57 | + disabled: true # Too strict |
| 58 | + - name: nested-structs |
| 59 | + disabled: true # Too strict |
| 60 | + - name: package-comments |
| 61 | + disabled: true # Not a lib |
| 62 | + - name: unused-receiver |
| 63 | + disabled: true # Too common |
| 64 | + sloglint: |
| 65 | + msg-style: capitalized |
| 66 | + key-naming-case: snake |
| 67 | + exclusions: |
| 68 | + rules: |
| 69 | + - path: internal/lsp/types.go |
| 70 | + text: comment .+ should be of the form # Types are documented with reference URLs |
| 71 | + - path: internal/ast/types.go |
| 72 | + text: malformed tag|bad syntax for struct tag # participle uses weird tags |
| 73 | + - path: _test.go |
| 74 | + text: dot-imports # gomega |
| 75 | + - path: _test.go |
| 76 | + text: function-length |
| 77 | + - path: _test.go |
| 78 | + linters: [gosec] |
| 79 | + - linters: [gocritic] |
| 80 | + text: contains a path separator # Not a valid check |
7 | 81 | formatters: |
8 | | - enable: |
9 | | - - gofumpt |
| 82 | + enable: [gofumpt] |
10 | 83 | settings: |
11 | 84 | gofumpt: |
12 | 85 | module-path: github.com/armsnyder/gdshader-language-server |
|
0 commit comments