| 1 |
# See for configurations: https://golangci-lint.run/usage/configuration/ |
| 2 |
version: 2 |
| 3 |
# See: https://golangci-lint.run/usage/formatters/ |
| 4 |
formatters: |
| 5 |
default: none |
| 6 |
enable: |
| 7 |
- gofmt # https://pkg.go.dev/cmd/gofmt |
| 8 |
- gofumpt # https://github.com/mvdan/gofumpt |
| 9 |
|
| 10 |
settings: |
| 11 |
gofmt: |
| 12 |
simplify: true # Simplify code: gofmt with `-s` option. |
| 13 |
|
| 14 |
gofumpt: |
| 15 |
# Module path which contains the source code being formatted. |
| 16 |
# Default: "" |
| 17 |
module-path: github.com/olekukonko/tablewriter # Should match with module in go.mod |
| 18 |
# Choose whether to use the extra rules. |
| 19 |
# Default: false |
| 20 |
extra-rules: true |
| 21 |
|
| 22 |
# See: https://golangci-lint.run/usage/linters/ |
| 23 |
linters: |
| 24 |
default: none |
| 25 |
enable: |
| 26 |
- staticcheck |
| 27 |
- govet |
| 28 |
- gocritic |
| 29 |
# - unused # TODO: There are many unused functions, should I directly remove those ? |
| 30 |
- ineffassign |
| 31 |
- unconvert |
| 32 |
- mirror |
| 33 |
- usestdlibvars |
| 34 |
- loggercheck |
| 35 |
- exptostd |
| 36 |
- godot |
| 37 |
- perfsprint |
| 38 |
|
| 39 |
# See: https://golangci-lint.run/usage/false-positives/ |
| 40 |
exclusion: |
| 41 |
# paths: |
| 42 |
# rules: |
| 43 |
|
| 44 |
settings: |
| 45 |
staticcheck: |
| 46 |
checks: |
| 47 |
- all |
| 48 |
- "-SA1019" # disabled because it warns about deprecated: kept for compatibility will be removed soon |
| 49 |
- "-ST1019" # disabled because it warns about deprecated: kept for compatibility will be removed soon |
| 50 |
- "-ST1021" # disabled because it warns to have comment on exported packages |
| 51 |
- "-ST1000" # disabled because it warns to have comment on exported functions |
| 52 |
- "-ST1020" # disabled because it warns to have at least one file in a package should have a package comment |
| 53 |
|
| 54 |
godot: |
| 55 |
period: false |