Skip to content

Commit

Permalink
Replace loopvar linter (#5976)
Browse files Browse the repository at this point in the history
## Which problem is this PR solving?
- Resolves #5972 

## Description of the changes
- Changed the loopvar linter to copyloopvar.

## How was this change tested?
- 

## Checklist
- [ ] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [ ] I have signed all commits
- [ ] I have added unit tests for the new functionality
- [ ] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `yarn lint` and `yarn test`

Signed-off-by: Anish Bista <[email protected]>
  • Loading branch information
anishbista60 authored Sep 11, 2024
1 parent 99f33a4 commit d2d92c6
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ linters:
- errorlint

# Checks for pointers to enclosing loop variables.
- exportloopref
- copyloopvar

- gocritic
- gofmt
Expand Down
1 change: 0 additions & 1 deletion cmd/collector/app/handler/grpc_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,6 @@ func TestBatchConsumer(t *testing.T) {

logger, _ := testutils.NewLogger()
for _, tc := range tests {
tc := tc
t.Parallel()
t.Run(tc.name, func(t *testing.T) {
processor := mockSpanProcessor{}
Expand Down
1 change: 0 additions & 1 deletion cmd/query/app/handler_archive_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ func TestGetArchivedTrace_NotFound(t *testing.T) {
reader: mockReader,
},
} {
tc := tc // capture loop var
t.Run(tc.name, func(t *testing.T) {
withTestServer(t, func(ts *testServer) {
ts.spanReader.On("GetTrace", mock.AnythingOfType("*context.valueCtx"), mock.AnythingOfType("model.TraceID")).
Expand Down

0 comments on commit d2d92c6

Please sign in to comment.