Skip to content

Commit 4e37557

Browse files
committed
Fix linting ignore rule for bson types like bson.D
The package changed when we converted to v2 of the Go driver, but we didn't update the golangci-lint config.
1 parent 22b912b commit 4e37557

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ linters:
4949
path: \.go$
5050
text: is deprecated
5151
- path: (.+)\.go$
52-
text: "composites: .+(primitive.(Binary|Decimal128|E|Timestamp)|types.(Destination|Source)(Client|Database)) struct literal uses unkeyed fields"
52+
text: "composites: .+(bson.(Binary|Decimal128|E|Timestamp)|types.(Destination|Source)(Client|Database)) struct literal uses unkeyed fields"
5353
paths:
5454
- third_party$
5555
- builtin$

AGENTS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ go run build.go sa:modtidy # go mod tidy
9090
- New tests should use `testify` (`github.com/stretchr/testify/require` and `assert`). The codebase
9191
is actively migrating away from GoConvey — do not add new GoConvey tests.
9292

93+
## Linting
94+
95+
Run `go run build.go sa:lint` to check for lint errors. Ignore LSP diagnostics that are suppressed
96+
by `.golangci.yml` — in particular, `bson.E struct literal uses unkeyed fields` is explicitly
97+
allowed and should not be treated as an error.
98+
9399
## Architecture
94100

95101
```

0 commit comments

Comments
 (0)