|
1 | | -# golangci-lint configuration. |
2 | | - |
3 | | -# For more information, see: |
4 | | -# https://golangci-lint.run/usage/configuration/. |
5 | | - |
6 | | -run: |
7 | | - timeout: 5m |
8 | | - |
| 1 | +version: "2" |
9 | 2 | linters: |
10 | | - # Disable all linters except the ones explicitly listed below. |
11 | | - disable-all: true |
| 3 | + default: none |
12 | 4 | enable: |
13 | 5 | - asciicheck |
14 | 6 | - bodyclose |
15 | 7 | - depguard |
16 | 8 | - dogsled |
17 | 9 | - dupl |
18 | 10 | - errcheck |
19 | | - - exhaustive |
20 | 11 | - goconst |
21 | 12 | - gocritic |
22 | 13 | - gocyclo |
23 | 14 | - godot |
24 | | - - gofumpt |
25 | 15 | - goheader |
26 | | - - goimports |
27 | | - - revive |
28 | 16 | - gomodguard |
29 | 17 | - goprintffuncname |
30 | 18 | - gosec |
31 | | - - gosimple |
32 | 19 | - govet |
33 | 20 | - ineffassign |
34 | 21 | - misspell |
35 | 22 | - nakedret |
36 | 23 | - nestif |
37 | | - - noctx |
38 | 24 | - nolintlint |
39 | 25 | - prealloc |
| 26 | + - revive |
40 | 27 | - rowserrcheck |
41 | | - - staticcheck |
42 | | - - stylecheck |
43 | 28 | - sqlclosecheck |
44 | | - - typecheck |
| 29 | + - staticcheck |
45 | 30 | - unconvert |
46 | 31 | - unparam |
47 | 32 | - unused |
48 | 33 | - whitespace |
49 | | - |
50 | | -linters-settings: |
51 | | - depguard: |
| 34 | + settings: |
| 35 | + depguard: |
| 36 | + rules: |
| 37 | + main: |
| 38 | + files: |
| 39 | + - $all |
| 40 | + allow: |
| 41 | + - $gostd |
| 42 | + - golang.org/x/sys/unix |
| 43 | + - golang.org/x/crypto/sha3 |
| 44 | + - golang.org/x/crypto/argon2 |
| 45 | + - github.com/oasisprotocol |
| 46 | + - github.com/btcsuite/btcd |
| 47 | + - github.com/adrg/xdg |
| 48 | + - github.com/AlecAivazis/survey/v2 |
| 49 | + - github.com/ethereum/go-ethereum |
| 50 | + - github.com/miguelmota/go-ethereum-hdwallet |
| 51 | + - github.com/mitchellh/mapstructure |
| 52 | + - github.com/olekukonko/tablewriter |
| 53 | + - github.com/spf13/cobra |
| 54 | + - github.com/spf13/pflag |
| 55 | + - github.com/spf13/viper |
| 56 | + - github.com/stretchr/testify |
| 57 | + - github.com/tyler-smith/go-bip39 |
| 58 | + - github.com/zondax/ledger-go |
| 59 | + - github.com/foxboron/go-uefi/authenticode |
| 60 | + - golang.org/x/text |
| 61 | + - gopkg.in/yaml.v3 |
| 62 | + - github.com/compose-spec/compose-go/v2 |
| 63 | + - github.com/github/go-spdx/v2 |
| 64 | + - github.com/opencontainers/image-spec/specs-go/v1 |
| 65 | + - oras.land/oras-go/v2 |
| 66 | + - github.com/wI2L/jsondiff |
| 67 | + - github.com/google/uuid |
| 68 | + - golang.org/x/net/idna |
| 69 | + - golang.org/x/term |
| 70 | + deny: |
| 71 | + - pkg: github.com/pkg/errors |
| 72 | + desc: Should be replaced by standard lib errors package |
| 73 | + - pkg: github.com/fxamacker/cbor/v2 |
| 74 | + desc: Use oasis-core/go/common/cbor instead |
| 75 | + exclusions: |
| 76 | + generated: lax |
| 77 | + presets: |
| 78 | + - comments |
| 79 | + - common-false-positives |
| 80 | + - legacy |
| 81 | + - std-error-handling |
52 | 82 | rules: |
53 | | - main: |
54 | | - files: |
55 | | - - $all |
56 | | - allow: |
57 | | - - $gostd |
58 | | - - golang.org/x/sys/unix |
59 | | - - golang.org/x/crypto/sha3 |
60 | | - - golang.org/x/crypto/argon2 |
61 | | - - github.com/oasisprotocol |
62 | | - - github.com/btcsuite/btcd |
63 | | - - github.com/adrg/xdg |
64 | | - - github.com/AlecAivazis/survey/v2 |
65 | | - - github.com/ethereum/go-ethereum |
66 | | - - github.com/miguelmota/go-ethereum-hdwallet |
67 | | - - github.com/mitchellh/mapstructure |
68 | | - - github.com/olekukonko/tablewriter |
69 | | - - github.com/spf13/cobra |
70 | | - - github.com/spf13/pflag |
71 | | - - github.com/spf13/viper |
72 | | - - github.com/stretchr/testify |
73 | | - - github.com/tyler-smith/go-bip39 |
74 | | - - github.com/zondax/ledger-go |
75 | | - - github.com/foxboron/go-uefi/authenticode |
76 | | - - golang.org/x/text |
77 | | - - gopkg.in/yaml.v3 |
78 | | - - github.com/compose-spec/compose-go/v2 |
79 | | - - github.com/github/go-spdx/v2 |
80 | | - - github.com/opencontainers/image-spec/specs-go/v1 |
81 | | - - oras.land/oras-go/v2 |
82 | | - - github.com/wI2L/jsondiff |
83 | | - - github.com/google/uuid |
84 | | - - golang.org/x/net/idna |
85 | | - - golang.org/x/term |
86 | | - exhaustive: |
87 | | - # Switch statements are to be considered exhaustive if a 'default' case is |
88 | | - # present, even if all enum members aren't listed in the switch. |
89 | | - default-signifies-exhaustive: true |
| 83 | + - linters: |
| 84 | + - revive |
| 85 | + path: "/common/" |
| 86 | + text: "var-naming: avoid meaningless package names" |
| 87 | + paths: |
| 88 | + - third_party$ |
| 89 | + - builtin$ |
| 90 | + - examples$ |
| 91 | + |
| 92 | +formatters: |
| 93 | + enable: |
| 94 | + - gofumpt |
| 95 | + - goimports |
| 96 | + |
| 97 | + settings: |
| 98 | + goimports: |
| 99 | + local-prefixes: |
| 100 | + - github.com/oasisprotocol/cli |
| 101 | + |
| 102 | + exclusions: |
| 103 | + generated: lax |
| 104 | + paths: |
| 105 | + - third_party$ |
| 106 | + - builtin$ |
| 107 | + - examples$ |
0 commit comments