Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
longfangsong authored Oct 19, 2021
2 parents 5789fd4 + 502f34f commit 2f1295a
Show file tree
Hide file tree
Showing 99 changed files with 12,540 additions and 11,384 deletions.
2 changes: 2 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ linters:
- staticcheck
- stylecheck
- gosec
- asciicheck
- bodyclose
linters-settings:
staticcheck:
checks: ["S1002","S1004","S1007","S1009","S1010","S1012","S1019","S1020","S1021","S1024","S1030","SA2*","SA3*","SA4009","SA5*","SA6000","SA6001","SA6005", "-SA2002"]
Expand Down
15 changes: 8 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -277,13 +277,14 @@ endif
# Usage:
# make bench-daily TO=/path/to/file.json
bench-daily:
go test github.com/pingcap/tidb/session -run TestBenchDaily --outfile bench_daily.json
go test github.com/pingcap/tidb/executor -run TestBenchDaily --outfile bench_daily.json
go test github.com/pingcap/tidb/tablecodec -run TestBenchDaily --outfile bench_daily.json
go test github.com/pingcap/tidb/expression -run TestBenchDaily --outfile bench_daily.json
go test github.com/pingcap/tidb/util/rowcodec -run TestBenchDaily --outfile bench_daily.json
go test github.com/pingcap/tidb/util/codec -run TestBenchDaily --outfile bench_daily.json
go test github.com/pingcap/tidb/util/benchdaily -run TestBenchDaily \
go test github.com/pingcap/tidb/session -run TestBenchDaily -bench Ignore --outfile bench_daily.json
go test github.com/pingcap/tidb/executor -run TestBenchDaily -bench Ignore --outfile bench_daily.json
go test github.com/pingcap/tidb/tablecodec -run TestBenchDaily -bench Ignore --outfile bench_daily.json
go test github.com/pingcap/tidb/expression -run TestBenchDaily -bench Ignore --outfile bench_daily.json
go test github.com/pingcap/tidb/util/rowcodec -run TestBenchDaily -bench Ignore --outfile bench_daily.json
go test github.com/pingcap/tidb/util/codec -run TestBenchDaily -bench Ignore --outfile bench_daily.json
go test github.com/pingcap/tidb/distsql -run TestBenchDaily -bench Ignore --outfile bench_daily.json
go test github.com/pingcap/tidb/util/benchdaily -run TestBenchDaily -bench Ignore \
-date `git log -n1 --date=unix --pretty=format:%cd` \
-commit `git log -n1 --pretty=format:%h` \
-outfile $(TO)
Expand Down
2 changes: 1 addition & 1 deletion br/tools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ bin/revive:
go build -o $@ github.com/mgechev/revive

bin/golangci-lint:
go build -o $@ github.com/golangci/golangci-lint/cmd/golangci-lint
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b ./bin v1.41.1

bin/failpoint-ctl:
go build -o $@ github.com/pingcap/failpoint/failpoint-ctl
Expand Down
2 changes: 1 addition & 1 deletion br/tools/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ go 1.16
require (
github.com/dnephin/govet v0.0.0-20171012192244-4a96d43e39d3
github.com/gogo/protobuf v1.3.2
github.com/golangci/golangci-lint v1.33.0
github.com/mattn/goveralls v0.0.2
github.com/mgechev/revive v1.0.2
github.com/pborman/uuid v1.2.1 // indirect
github.com/pingcap/errors v0.11.5-0.20201126102027-b0a155152ca3
github.com/pingcap/failpoint v0.0.0-20200702092429-9f69995143ce
github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd
Expand Down
582 changes: 4 additions & 578 deletions br/tools/go.sum

Large diffs are not rendered by default.

7 changes: 2 additions & 5 deletions br/tools/go_mod_guard.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@ package tools
// This file ensures `go mod tidy` will not delete entries to all tools.

import (
// golangci-lint is a package-based linter
_ "github.com/golangci/golangci-lint/pkg/commands"

// revive is a file-based linter
_ "github.com/mgechev/revive/lint"
_ "github.com/mgechev/revive"

// gocovmerge merges multiple coverage profile into one
_ "github.com/wadey/gocovmerge"
Expand All @@ -19,7 +16,7 @@ import (
_ "github.com/dnephin/govet"

// failpoint enables manual 'failure' of some execution points.
_ "github.com/pingcap/failpoint"
_ "github.com/pingcap/failpoint/failpoint-ctl"

// errdoc-gen generates errors.toml.
_ "github.com/pingcap/errors/errdoc-gen"
Expand Down
Loading

0 comments on commit 2f1295a

Please sign in to comment.