Skip to content

Commit

Permalink
*: enable golangci-lint exportloopref (pingcap#28991)
Browse files Browse the repository at this point in the history
  • Loading branch information
snprajwal authored Nov 1, 2021
1 parent 9621d73 commit 3032d87
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
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 @@ -203,6 +203,7 @@ func (e *ShowExec) fetchShowPlacementForPartition(ctx context.Context) (err erro

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 @@ -1825,6 +1825,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

0 comments on commit 3032d87

Please sign in to comment.