Skip to content

Commit ddde0e1

Browse files
authored
Fix linting ignore rule for bson types like bson.D (#926)
The package changed when we converted to v2 of the Go driver, but we didn't update the golangci-lint config.
1 parent 1be3ee2 commit ddde0e1

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
@@ -88,6 +88,12 @@ go run build.go sa:modtidy # go mod tidy
8888
- New tests should use `testify` (`github.com/stretchr/testify/require` and `assert`). The codebase
8989
is actively migrating away from GoConvey — do not add new GoConvey tests.
9090

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

9399
```

0 commit comments

Comments
 (0)