Skip to content

Search backend: fix symbol duplication

Administrator requested to merge backend-integration/cc/fix-duplicate-symbols into main

Created by: camdencheek

This fixes an issue where we would return duplicate symbols. This was happening because we were capturing a reference to a loop variable.

Maybe we should look at enabling https://github.com/kyoh86/exportloopref in our linters.

Fixes https://github.com/sourcegraph/sourcegraph/issues/31934

Before: Screen Shot 2022-02-28 at 11 32 08

After: Screen Shot 2022-02-28 at 11 32 33

Test plan

Manually tested the minimal bug fix. I will followup with a PR that extracts that chunk of code and tests it.

Merge request reports

Loading