|
| 1 | +version: "2" |
| 2 | +run: |
| 3 | + # If set, we pass it to "go list -mod={option}". From "go help modules": |
| 4 | + # If invoked with -mod=readonly, the go command is disallowed from the implicit |
| 5 | + # automatic updating of go.mod described above. Instead, it fails when any changes |
| 6 | + # to go.mod are needed. This setting is most useful to check that go.mod does |
| 7 | + # not need updates, such as in a continuous integration and testing system. |
| 8 | + # If invoked with -mod=vendor, the go command assumes that the vendor |
| 9 | + # directory holds the correct copies of dependencies and ignores |
| 10 | + # the dependency descriptions in go.mod. |
| 11 | + # |
| 12 | + # Allowed values: readonly|vendor|mod |
| 13 | + # Default: "" |
| 14 | + modules-download-mode: readonly |
| 15 | + |
| 16 | + # Include test files or not. |
| 17 | + # Default: true |
| 18 | + tests: false |
| 19 | + |
| 20 | +linters: |
| 21 | + default: all |
| 22 | + |
| 23 | + disable: |
| 24 | + # We don't want to limit dependencies |
| 25 | + - depguard |
| 26 | + # Not terribly useful and ends up in too much boilerplate |
| 27 | + - exhaustruct |
| 28 | + |
| 29 | + # Not useful |
| 30 | + - depguard |
| 31 | + # Not terribly useful and ends up in too much boilerplate |
| 32 | + - exhaustruct |
| 33 | + |
| 34 | + # Seems excessive |
| 35 | + - tagalign |
| 36 | + |
| 37 | + # More false positive than actual issues |
| 38 | + - mnd |
| 39 | + |
| 40 | + - noinlineerr |
| 41 | + # Annyoing sometimes |
| 42 | + - revive |
| 43 | + |
| 44 | + settings: |
| 45 | + wrapcheck: |
| 46 | + ignore-sigs: |
| 47 | + # Fiber takes care of unwrapping the error |
| 48 | + - func (*github.com/gofiber/fiber/v2.Ctx) |
| 49 | + |
| 50 | + # No point in wrapping these |
| 51 | + - func encoding/json.Marshal(v any) |
| 52 | + - func encoding/json.UnmarshalJSON(v any) |
| 53 | + |
| 54 | + # Defaults |
| 55 | + - .Errorf( |
| 56 | + - errors.New( |
| 57 | + - errors.Unwrap( |
| 58 | + - .Wrap( |
| 59 | + - .Wrapf( |
| 60 | + - .WithMessage( |
| 61 | + - .WithMessagef( |
| 62 | + - .WithStack( |
| 63 | + funlen: |
| 64 | + # Increase the number of lines, considering funlen counts comments as well |
| 65 | + # (https://github.com/ultraware/funlen/issues/12) |
| 66 | + # |
| 67 | + # default: 60 |
| 68 | + lines: 80 |
| 69 | + usetesting: |
| 70 | + context-background: true |
| 71 | + context-todo: true |
| 72 | + os-chdir: true |
| 73 | + os-mkdir-temp: true |
| 74 | + os-setenv: true |
| 75 | + os-create-temp: true |
| 76 | + os-temp-dir: false |
| 77 | + |
| 78 | + exclusions: |
| 79 | + generated: lax |
| 80 | + presets: |
| 81 | + - comments |
| 82 | + - common-false-positives |
| 83 | + - legacy |
| 84 | + - std-error-handling |
| 85 | + paths: |
| 86 | + - third_party$ |
| 87 | + - builtin$ |
| 88 | + - examples$ |
| 89 | + |
| 90 | +formatters: |
| 91 | + enable: |
| 92 | + - gci |
| 93 | + - gofmt |
| 94 | + - gofumpt |
| 95 | + - goimports |
| 96 | + |
| 97 | + exclusions: |
| 98 | + generated: lax |
| 99 | + paths: |
| 100 | + - third_party$ |
| 101 | + - builtin$ |
| 102 | + - examples$ # fast: true |
0 commit comments