|  | 
|  | 1 | +version: "2" | 
|  | 2 | + | 
| 1 | 3 | linters: | 
| 2 | 4 |   enable: | 
| 3 | 5 |     - staticcheck | 
| 4 | 6 |     - unconvert | 
| 5 |  | -    - gofmt | 
| 6 |  | -    - goimports | 
| 7 | 7 |     - ineffassign | 
| 8 |  | -    - vet | 
| 9 | 8 |     - unused | 
| 10 | 9 |     - misspell | 
| 11 | 10 |     - revive | 
| 12 | 11 |   disable: | 
| 13 | 12 |     - errcheck | 
|  | 13 | +  exclusions: | 
|  | 14 | +    rules: | 
|  | 15 | +      # We have protoc-generated ttRPC/gRPC code. When adding extra functions | 
|  | 16 | +      # for generated types we want to consistently violate golint's semantic | 
|  | 17 | +      # function name spelling rules, instead of inconsistently doing so only | 
|  | 18 | +      # from automatically generated files. These rules are for that. | 
|  | 19 | +      - path: pkg/adaptation/result.go | 
|  | 20 | +        linters: | 
|  | 21 | +          - golint | 
|  | 22 | +          - revive | 
|  | 23 | +        text: "should be claim" | 
|  | 24 | +      # Differ copies pods and containers with Mutexes for diffing. Should be harmless. | 
|  | 25 | +      - path: plugins/differ/nri-differ.go | 
|  | 26 | +        linters: | 
|  | 27 | +          - govet | 
|  | 28 | +        text: "copylocks: .*protobuf/internal/impl.MessageState.*" | 
|  | 29 | +      # We dot-import ginkgo and gomega in some tests. Silence any related errors. | 
|  | 30 | +      - path: 'pkg/adaptation|pkg/runtime-tools/generate|pkg/net/multiplex' | 
|  | 31 | +        linters: | 
|  | 32 | +          - revive | 
|  | 33 | +        text: "dot-imports:" | 
|  | 34 | +      - linters: | 
|  | 35 | +          - revive | 
|  | 36 | +        text: "package-comments:" | 
| 14 | 37 | 
 | 
| 15 |  | -issues: | 
| 16 |  | -  include: | 
| 17 |  | -    - EXC0002 | 
| 18 |  | -  exclude-rules: | 
| 19 |  | -    # We have protoc-generated ttRPC/gRPC code. When adding extra functions | 
| 20 |  | -    # for generated types we want to consistently violate golint's semantic | 
| 21 |  | -    # function name spelling rules, instead of inconsistently doing so only | 
| 22 |  | -    # from automatically generated files. These rules are for that. | 
| 23 |  | -    - path: pkg/adaptation/result.go | 
| 24 |  | -      linters: | 
| 25 |  | -        - golint | 
| 26 |  | -        - revive | 
| 27 |  | -      text: "should be claim" | 
| 28 |  | -    # Ignore naming violation in the test suite as well. | 
| 29 |  | -    - path: pkg/adaptation/adaptation_suite_test.go | 
| 30 |  | -      linters: | 
| 31 |  | -        - golint | 
| 32 |  | -        - revive | 
| 33 |  | -      text: "should be strip" | 
| 34 |  | -    # Differ copies pods and containers with Mutexes for diffing. Should be harmless. | 
| 35 |  | -    - path: plugins/differ/nri-differ.go | 
| 36 |  | -      linters: | 
| 37 |  | -        - govet | 
| 38 |  | -      text: "copylocks: .*protobuf/internal/impl.MessageState.*" | 
| 39 |  | -    # We dot-import ginkgo and gomega in some tests. Silence any related errors. | 
| 40 |  | -    - path: 'pkg/adaptation|pkg/runtime-tools/generate|pkg/net/multiplex' | 
| 41 |  | -      text: "dot-imports:" | 
|  | 38 | +formatters: | 
|  | 39 | +  enable: | 
|  | 40 | +    - gofmt | 
|  | 41 | +    - goimports | 
| 42 | 42 | 
 | 
| 43 | 43 | run: | 
| 44 | 44 |   timeout: 2m | 
0 commit comments