Skip to content

Commit b1329c9

Browse files
authored
Disallow usage of pkg/errors and otlp proto module (open-telemetry#5785)
Signed-off-by: Bogdan <bogdandrutu@gmail.com>
1 parent 4746b18 commit b1329c9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.golangci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,16 @@ linters-settings:
105105
packages-with-error-message:
106106
# See https://github.com/open-telemetry/opentelemetry-collector/issues/5200 for rationale
107107
- sync/atomic: "Use go.uber.org/atomic instead of sync/atomic"
108+
- github.com/pkg/errors: "Use 'errors' or 'fmt' instead of github.com/pkg/errors"
109+
# Add a different guard rule so that we can ignore tests.
110+
additional-guards:
111+
- list-type: denylist
112+
include-go-root: true
113+
packages-with-error-message:
114+
- go.opentelemetry.io/proto: "Use go.opentelemetry.io/collector/pdata instead"
115+
# Allow in tests for testing pdata or other receivers/exporters that expect OTLP.
116+
ignore-file-rules:
117+
- "**/*_test.go"
108118

109119
linters:
110120
enable:

0 commit comments

Comments
 (0)