search: Handle ()() in autofix
Created by: keegancsmith
Noticed this flakey test failure in CI. It is a legitimate issue were we do
not properly escape ()()
. It escaped it as \(\)()
. This is due to the
replacement regex checking for the preceding character being \
, which means
when ReplaceAll runs after replacing the first ()
the regex won't match since
^
means beginning of string, not match.
I wasn't sure how to make this happen in a regex, so wrote a function implementing the functionality.
Merge request reports
Activity
Created by: codecov[bot]
Codecov Report
Merging #4160 into master will increase coverage by
0.03%
. The diff coverage is100%
.Impacted Files Coverage Δ .../frontend/internal/pkg/search/query/types/check.go 95.32% <100%> (+0.76%)
pkg/extsvc/github/repos.go 67.3% <0%> (ø)
cmd/frontend/graphqlbackend/external_services.go 0% <0%> (ø)
cmd/frontend/graphqlbackend/external_service.go 0% <0%> (ø)
cmd/repo-updater/repoupdater/server.go 62.18% <0%> (+1.32%)
...eb/src/site-admin/SiteAdminExternalServiceForm.tsx 78.94% <0%> (+2.75%)
Please register or sign in to reply