Skip to content

Commit cd79115

Browse files
benjirewisprestonvasquez
authored andcommitted
resolve merge conflicts
1 parent ed484be commit cd79115

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

.evergreen/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,6 +1045,7 @@ tasks:
10451045
- name: sa-fmt
10461046
tags: ["static-analysis"]
10471047
commands:
1048+
- func: install-linters
10481049
- func: run-make
10491050
vars:
10501051
targets: check-fmt

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ build-tests:
4747

4848
.PHONY: check-fmt
4949
check-fmt:
50-
etc/check_fmt.sh $(PKGS)
50+
etc/check_fmt.sh
5151

5252
# check-modules runs "go mod tidy" then "go mod vendor" and exits with a non-zero exit code if there
5353
# are any module or vendored modules changes. The intent is to confirm two properties:
@@ -69,7 +69,7 @@ doc:
6969

7070
.PHONY: fmt
7171
fmt:
72-
gofmt -l -s -w $(PKGS)
72+
go fmt ./...
7373

7474
.PHONY: lint
7575
lint:

etc/check_fmt.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#!/usr/bin/env bash
2-
# check_fmt gopackages...
3-
# Runs gofmt on given packages and checks that *_example_test.go files have wrapped lines.
2+
# check_fmt
3+
# Runs go fmt on all packages in the repo and checks that *_example_test.go files have wrapped lines.
44

5-
gofmt_out="$(gofmt -l -s "$@")"
5+
gofmt_out="$(go fmt ./...)"
66

77
if [[ $gofmt_out ]]; then
8-
echo "gofmt check failed for:";
8+
echo "go fmt check failed for:";
99
sed -e 's/^/ - /' <<< "$gofmt_out";
1010
exit 1;
1111
fi
@@ -16,7 +16,7 @@ fi
1616
# E.g ignored lines:
1717
# // "mongodb://ldap-user:ldap-pwd@localhost:27017/?authMechanism=PLAIN"
1818
# // (https://www.mongodb.com/docs/manual/core/authentication-mechanisms-enterprise/#security-auth-ldap).
19-
lll_out="$(find "$@" -type f -name "*_examples_test.go" | lll -w 4 -l 80 -e '^\s*\/\/.+:\/\/' --files)"
19+
lll_out="$(find . -type f -name "*_examples_test.go" | lll -w 4 -l 80 -e '^\s*\/\/.+:\/\/' --files)"
2020

2121
if [[ $lll_out ]]; then
2222
echo "lll check failed for:";

mongo/crud_examples_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -749,8 +749,9 @@ func ExampleClient_StartSession_withTransaction() {
749749
result, err := sess.WithTransaction(
750750
context.TODO(),
751751
func(sessCtx mongo.SessionContext) (interface{}, error) {
752-
// Use sessCtx as the Context parameter for InsertOne and FindOne so
753-
// both operations are run in a transaction.
752+
// Use the mongo.SessionContext as the Context parameter for
753+
// InsertOne and FindOne so both operations are run in the same
754+
// transaction.
754755

755756
coll := client.Database("db").Collection("coll")
756757
res, err := coll.InsertOne(sessCtx, bson.D{{"x", 1}})

0 commit comments

Comments
 (0)