Skip to content

Commit 0e5ae89

Browse files
authored
GODRIVER-2661 Fix make targets that still refer to PKGS. (#1141)
1 parent eff5307 commit 0e5ae89

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
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
@@ -35,7 +35,7 @@ build-tests:
3535

3636
.PHONY: check-fmt
3737
check-fmt:
38-
etc/check_fmt.sh $(PKGS)
38+
etc/check_fmt.sh
3939

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

5858
.PHONY: fmt
5959
fmt:
60-
gofmt -l -s -w $(PKGS)
60+
go fmt ./...
6161

6262
.PHONY: lint
6363
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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,8 @@ func ExampleClient_StartSession_withTransaction() {
752752
context.TODO(),
753753
func(ctx mongo.SessionContext) (interface{}, error) {
754754
// Use the mongo.SessionContext as the Context parameter for
755-
// InsertOne and FindOne so both operations are run in the same transaction
755+
// InsertOne and FindOne so both operations are run in the same
756+
// transaction.
756757

757758
coll := client.Database("db").Collection("coll")
758759
res, err := coll.InsertOne(ctx, bson.D{{"x", 1}})

0 commit comments

Comments
 (0)