1linters: 2 disable-all: true 3 enable: 4 - gofmt 5 - govet 6 - unconvert 7 - staticcheck 8 - ineffassign 9 - unparam 10 11issues: 12 # Disable the default exclude list so that all excludes are explicitly 13 # defined in this file. 14 exclude-use-default: false 15 16 exclude-rules: 17 # Temp Ignore SA9004: only the first constant in this group has an explicit type 18 # https://staticcheck.io/docs/checks#SA9004 19 - linters: [staticcheck] 20 text: 'SA9004:' 21 22 - linters: [staticcheck] 23 text: 'SA1019: Package github.com/golang/protobuf/jsonpb is deprecated' 24 25 - linters: [staticcheck] 26 text: 'SA1019: Package github.com/golang/protobuf/proto is deprecated' 27 28 # An argument that always receives the same value is often not a problem. 29 - linters: [unparam] 30 text: 'always receives' 31 32 # Often functions will implement an interface that returns an error without 33 # needing to return an error. Sometimes the error return value is unnecessary 34 # but a linter can not tell the difference. 35 - linters: [unparam] 36 text: 'result \d+ \(error\) is always nil' 37 38 # Allow unused parameters to start with an underscore. Arguments with a name 39 # of '_' are already ignored. 40 # Ignoring longer names that start with underscore allow for better 41 # self-documentation than a single underscore by itself. Underscore arguments 42 # should generally only be used when a function is implementing an interface. 43 - linters: [unparam] 44 text: '`_[^`]*` is unused' 45 46 # Temp ignore some common unused parameters so that unparam can be added 47 # incrementally. 48 - linters: [unparam] 49 text: '`(t|resp|req|entMeta)` is unused' 50 51 # Temp ignore everything in _oss(_test).go and _ent(_test).go. Many of these 52 # could use underscore to ignore the unused arguments, but the "always returns" 53 # issue will likely remain in oss, and will need to be excluded. 54 - linters: [unparam] 55 path: '(_oss.go|_oss_test.go|_ent.go|_ent_test.go)' 56 57linters-settings: 58 gofmt: 59 simplify: true 60 61run: 62 timeout: 10m 63