Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*: enable golangci-lint exportloopref #28991

Merged
merged 5 commits into from
Nov 1, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ linters:
- gosec
- asciicheck
- bodyclose
- exportloopref
- rowserrcheck
- unconvert

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
1 change: 1 addition & 0 deletions executor/show_placement.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ func (e *ShowExec) fetchShowPlacementForPartition(_ context.Context) (err error)

var partition *model.PartitionDefinition
for _, par := range tblInfo.Partition.Definitions {
par := par
if par.Name.L == e.Partition.L {
partition = &par
break
Expand Down
1 change: 1 addition & 0 deletions planner/core/find_best_task.go
Original file line number Diff line number Diff line change
Expand Up @@ -1822,6 +1822,7 @@ func (ds *DataSource) convertToPointGet(prop *property.PhysicalProperty, candida
if ds.isPartition {
if pi := ds.tableInfo.GetPartitionInfo(); pi != nil {
for _, def := range pi.Definitions {
def := def
if def.ID == ds.physicalTableID {
partitionInfo = &def
break
Expand Down