mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 17:51:57 +00:00
all: replace regexp with grafana/regexp (#30948)
grafana/regexp's speedup branch contains the stdlib regexp with multiple patches applied to speed up regexp. The benchmark improvements are quite impressive across the board. The series of patches are being considered for inclusion in golang. I took a look over them, and they look legit enough for us to start using it. This commit replaces all uses of regexp with grafana/regexp. This replacement was done via a simple string replace on ^\s*"regexp" Followed by goimports -w across the repository. I then manually inspected each result to ensure it was on an import.
This commit is contained in:
parent
5b93082a8b
commit
039b26201f
@ -28,6 +28,8 @@ linters-settings:
|
||||
- github.com/pkg/errors: "Use github.com/sourcegraph/sourcegraph/lib/errors instead"
|
||||
- github.com/cockroachdb/errors: "Use github.com/sourcegraph/sourcegraph/lib/errors instead"
|
||||
- github.com/hashicorp/go-multierror: "Use github.com/sourcegraph/sourcegraph/lib/errors instead"
|
||||
# More performant regexp
|
||||
- regexp: "Use github.com/grafana/regexp instead"
|
||||
gocritic:
|
||||
disabled-checks:
|
||||
- appendAssign # Too many false positives
|
||||
|
||||
@ -7,10 +7,11 @@ import (
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/cmd/frontend/envvar"
|
||||
"github.com/sourcegraph/sourcegraph/internal/api"
|
||||
"github.com/sourcegraph/sourcegraph/internal/api/internalapi"
|
||||
|
||||
@ -5,13 +5,13 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"math"
|
||||
"regexp"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
"github.com/inconshreveable/log15"
|
||||
"github.com/neelance/parallel"
|
||||
"github.com/opentracing/opentracing-go"
|
||||
|
||||
@ -7,10 +7,11 @@ import (
|
||||
"net/http"
|
||||
"net/url"
|
||||
"path"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/cmd/frontend/backend"
|
||||
"github.com/sourcegraph/sourcegraph/cmd/frontend/internal/cloneurls"
|
||||
"github.com/sourcegraph/sourcegraph/internal/api"
|
||||
|
||||
@ -9,12 +9,12 @@ import (
|
||||
"net/http/httputil"
|
||||
"net/url"
|
||||
"os"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/grafana/regexp"
|
||||
"github.com/inconshreveable/log15"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/cmd/frontend/auth"
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package markdown
|
||||
|
||||
import (
|
||||
"regexp"
|
||||
"regexp" //nolint:depguard // bluemonday requires this pkg
|
||||
"sync"
|
||||
|
||||
"github.com/microcosm-cc/bluemonday"
|
||||
|
||||
@ -4,10 +4,10 @@ import (
|
||||
"net/http"
|
||||
"net/url"
|
||||
"reflect"
|
||||
"regexp"
|
||||
"testing"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/grafana/regexp"
|
||||
)
|
||||
|
||||
func TestRepoPattern(t *testing.T) {
|
||||
|
||||
@ -4,13 +4,13 @@ import (
|
||||
"bytes"
|
||||
"context"
|
||||
"io"
|
||||
"regexp"
|
||||
"regexp/syntax"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
"unicode/utf8"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
"github.com/grafana/regexp/syntax"
|
||||
"github.com/opentracing/opentracing-go/ext"
|
||||
otlog "github.com/opentracing/opentracing-go/log"
|
||||
"go.uber.org/atomic"
|
||||
|
||||
@ -6,13 +6,14 @@ import (
|
||||
"context"
|
||||
"os"
|
||||
"reflect"
|
||||
"regexp"
|
||||
"regexp/syntax"
|
||||
"sort"
|
||||
"strconv"
|
||||
"testing"
|
||||
"testing/iotest"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
"github.com/grafana/regexp/syntax"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/cmd/searcher/protocol"
|
||||
"github.com/sourcegraph/sourcegraph/internal/pathmatch"
|
||||
"github.com/sourcegraph/sourcegraph/internal/store"
|
||||
|
||||
@ -4,7 +4,7 @@ import (
|
||||
"archive/zip"
|
||||
"context"
|
||||
"io"
|
||||
"regexp/syntax"
|
||||
"regexp/syntax" //nolint:depguard // zoekt requires this pkg
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
@ -2,8 +2,8 @@ package database
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"regexp"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
"github.com/mattn/go-sqlite3"
|
||||
)
|
||||
|
||||
|
||||
@ -3,9 +3,9 @@ package store
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"regexp/syntax"
|
||||
"strings"
|
||||
|
||||
"github.com/grafana/regexp/syntax"
|
||||
"github.com/keegancsmith/sqlf"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/cmd/symbols/internal/types"
|
||||
|
||||
@ -2,7 +2,8 @@ package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
"regexp"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
)
|
||||
|
||||
var indexFilenamePattern = regexp.MustCompile(`^(.+)\.\d+\.([0-9A-Fa-f]{40})\.dump$`)
|
||||
|
||||
@ -5,9 +5,10 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
)
|
||||
|
||||
const rootPackage = "github.com/sourcegraph/sourcegraph"
|
||||
|
||||
@ -4,8 +4,9 @@ import (
|
||||
"bytes"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"sort"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
)
|
||||
|
||||
// parseNames returns a map from package paths to the name declared by that package.
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
package lints
|
||||
|
||||
import (
|
||||
"regexp"
|
||||
"sort"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/dev/depgraph/internal/graph"
|
||||
)
|
||||
|
||||
|
||||
@ -4,9 +4,10 @@ import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
)
|
||||
|
||||
// Dotify serializes the given package and edge data into a DOT-formatted graph.
|
||||
|
||||
@ -8,13 +8,13 @@ import (
|
||||
"log"
|
||||
"os"
|
||||
"os/exec"
|
||||
"regexp"
|
||||
"runtime"
|
||||
"sort"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
"github.com/lib/pq"
|
||||
_ "github.com/lib/pq"
|
||||
"golang.org/x/sync/errgroup"
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
package bk
|
||||
|
||||
import (
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
)
|
||||
|
||||
// CleanANSI cleans up Buildkite log output markup.
|
||||
|
||||
@ -8,9 +8,10 @@ import (
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/dev/sg/internal/bk"
|
||||
"github.com/sourcegraph/sourcegraph/lib/errors"
|
||||
)
|
||||
|
||||
@ -7,11 +7,12 @@ import (
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/dev/sg/internal/db"
|
||||
"github.com/sourcegraph/sourcegraph/dev/sg/internal/run"
|
||||
"github.com/sourcegraph/sourcegraph/dev/sg/internal/stdout"
|
||||
|
||||
@ -4,9 +4,9 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
"golang.org/x/oauth2"
|
||||
"golang.org/x/oauth2/google"
|
||||
"google.golang.org/api/drive/v3"
|
||||
|
||||
@ -8,11 +8,11 @@ import (
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
"github.com/rjeczalik/notify"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/dev/sg/internal/stdout"
|
||||
|
||||
@ -8,7 +8,6 @@ import (
|
||||
"net/url"
|
||||
"os"
|
||||
"os/exec"
|
||||
"regexp"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@ -16,6 +15,7 @@ import (
|
||||
|
||||
"github.com/buildkite/go-buildkite/v3/buildkite"
|
||||
"github.com/gen2brain/beeep"
|
||||
"github.com/grafana/regexp"
|
||||
"github.com/peterbourgon/ff/v3/ffcli"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/dev/sg/internal/bk"
|
||||
|
||||
@ -4,10 +4,10 @@ package resolvers
|
||||
|
||||
import (
|
||||
"context"
|
||||
"regexp"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
regexp "github.com/grafana/regexp"
|
||||
enqueuer "github.com/sourcegraph/sourcegraph/enterprise/internal/codeintel/autoindex/enqueuer"
|
||||
dbstore "github.com/sourcegraph/sourcegraph/enterprise/internal/codeintel/stores/dbstore"
|
||||
lsifstore "github.com/sourcegraph/sourcegraph/enterprise/internal/codeintel/stores/lsifstore"
|
||||
|
||||
@ -6,9 +6,9 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"regexp"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/grafana/regexp"
|
||||
"github.com/inconshreveable/log15"
|
||||
|
||||
apiclient "github.com/sourcegraph/sourcegraph/enterprise/internal/executor"
|
||||
|
||||
@ -8,10 +8,10 @@ import (
|
||||
"fmt"
|
||||
"net/url"
|
||||
"os"
|
||||
"regexp"
|
||||
"testing"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"github.com/grafana/regexp"
|
||||
|
||||
authzGitHub "github.com/sourcegraph/sourcegraph/enterprise/internal/authz/github"
|
||||
edb "github.com/sourcegraph/sourcegraph/enterprise/internal/database"
|
||||
|
||||
@ -2,9 +2,10 @@ package indexing
|
||||
|
||||
import (
|
||||
"context"
|
||||
"regexp"
|
||||
"time"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/codeintel/policies"
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/codeintel/stores/dbstore"
|
||||
"github.com/sourcegraph/sourcegraph/internal/api"
|
||||
|
||||
@ -4,10 +4,10 @@ package indexing
|
||||
|
||||
import (
|
||||
"context"
|
||||
"regexp"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
regexp "github.com/grafana/regexp"
|
||||
policies "github.com/sourcegraph/sourcegraph/enterprise/internal/codeintel/policies"
|
||||
dbstore "github.com/sourcegraph/sourcegraph/enterprise/internal/codeintel/stores/dbstore"
|
||||
api "github.com/sourcegraph/sourcegraph/internal/api"
|
||||
|
||||
@ -9,10 +9,11 @@ import (
|
||||
"io"
|
||||
"log"
|
||||
"os"
|
||||
"regexp"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/dev/ci/runtype"
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/dev/ci/internal/buildkite"
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/dev/ci/internal/ci"
|
||||
|
||||
@ -11,11 +11,11 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/ghodss/yaml"
|
||||
"github.com/grafana/regexp"
|
||||
)
|
||||
|
||||
type featureFlags struct {
|
||||
|
||||
@ -2,7 +2,8 @@ package operations
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"regexp"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
|
||||
bk "github.com/sourcegraph/sourcegraph/enterprise/dev/ci/internal/buildkite"
|
||||
)
|
||||
|
||||
@ -3,8 +3,9 @@ package syntax
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
)
|
||||
|
||||
// The parse tree for search input. It is a list of expressions.
|
||||
|
||||
@ -5,11 +5,11 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path"
|
||||
"regexp"
|
||||
"sort"
|
||||
"sync"
|
||||
|
||||
"github.com/gobwas/glob"
|
||||
"github.com/grafana/regexp"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/batches/store"
|
||||
btypes "github.com/sourcegraph/sourcegraph/enterprise/internal/batches/types"
|
||||
|
||||
@ -6,12 +6,12 @@ import (
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/dnaeon/go-vcr/cassette"
|
||||
"github.com/dnaeon/go-vcr/recorder"
|
||||
"github.com/grafana/regexp"
|
||||
"github.com/inconshreveable/log15"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/internal/extsvc"
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
package store
|
||||
|
||||
import (
|
||||
"regexp"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
"github.com/keegancsmith/sqlf"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/batches/search"
|
||||
|
||||
@ -3,11 +3,11 @@ package enqueuer
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"regexp"
|
||||
"sort"
|
||||
"testing"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"github.com/grafana/regexp"
|
||||
"golang.org/x/time/rate"
|
||||
|
||||
store "github.com/sourcegraph/sourcegraph/enterprise/internal/codeintel/stores/dbstore"
|
||||
|
||||
@ -2,7 +2,8 @@ package enqueuer
|
||||
|
||||
import (
|
||||
"context"
|
||||
"regexp"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/codeintel/stores/dbstore"
|
||||
"github.com/sourcegraph/sourcegraph/internal/api"
|
||||
|
||||
@ -4,9 +4,9 @@ package enqueuer
|
||||
|
||||
import (
|
||||
"context"
|
||||
"regexp"
|
||||
"sync"
|
||||
|
||||
regexp "github.com/grafana/regexp"
|
||||
dbstore "github.com/sourcegraph/sourcegraph/enterprise/internal/codeintel/stores/dbstore"
|
||||
api "github.com/sourcegraph/sourcegraph/internal/api"
|
||||
basestore "github.com/sourcegraph/sourcegraph/internal/database/basestore"
|
||||
|
||||
@ -3,9 +3,9 @@ package gitserver
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"regexp"
|
||||
"time"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
"github.com/opentracing/opentracing-go/log"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/internal/api"
|
||||
|
||||
@ -3,9 +3,10 @@ package compute
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"regexp"
|
||||
"strconv"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/internal/search/result"
|
||||
)
|
||||
|
||||
|
||||
@ -2,10 +2,11 @@ package compute
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"regexp"
|
||||
"testing"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
"github.com/hexops/autogold"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/internal/search/result"
|
||||
)
|
||||
|
||||
|
||||
@ -3,9 +3,10 @@ package compute
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/internal/authz"
|
||||
"github.com/sourcegraph/sourcegraph/internal/comby"
|
||||
"github.com/sourcegraph/sourcegraph/internal/search/result"
|
||||
|
||||
@ -3,9 +3,9 @@ package compute
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"regexp"
|
||||
"testing"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
"github.com/hexops/autogold"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/internal/api"
|
||||
|
||||
@ -2,7 +2,8 @@ package compute
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"regexp"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/internal/lazyregexp"
|
||||
"github.com/sourcegraph/sourcegraph/internal/search/query"
|
||||
|
||||
@ -3,10 +3,11 @@ package compute
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"regexp"
|
||||
"testing"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
"github.com/hexops/autogold"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/internal/comby"
|
||||
)
|
||||
|
||||
|
||||
@ -4,11 +4,11 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"regexp"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
"github.com/inconshreveable/log15"
|
||||
"github.com/opentracing/opentracing-go/log"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
|
||||
@ -3,11 +3,11 @@ package query
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"regexp"
|
||||
"sort"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
"github.com/inconshreveable/log15"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/insights/compression"
|
||||
|
||||
@ -3,11 +3,11 @@ package resolvers
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"regexp"
|
||||
"sort"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
"github.com/graph-gophers/graphql-go"
|
||||
"github.com/graph-gophers/graphql-go/relay"
|
||||
"github.com/inconshreveable/log15"
|
||||
|
||||
3
go.mod
3
go.mod
@ -77,6 +77,7 @@ require (
|
||||
github.com/gorilla/sessions v1.2.1
|
||||
github.com/goware/urlx v0.3.1
|
||||
github.com/grafana-tools/sdk v0.0.0-20220203092117-edae16afa87b
|
||||
github.com/grafana/regexp v0.0.0-20220202152701-6a046c4caf32
|
||||
github.com/graph-gophers/graphql-go v1.3.0
|
||||
github.com/graphql-go/graphql v0.8.0
|
||||
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79
|
||||
@ -392,7 +393,7 @@ require (
|
||||
// or intentional forks.
|
||||
replace (
|
||||
// We maintain our own fork of Zoekt. Update with ./dev/zoekt/update
|
||||
github.com/google/zoekt => github.com/sourcegraph/zoekt v0.0.0-20220210200412-9d1b56e6180f
|
||||
github.com/google/zoekt => github.com/sourcegraph/zoekt v0.0.0-20220211090549-756e833d8ebe
|
||||
// We use a fork of Alertmanager to allow prom-wrapper to better manipulate Alertmanager configuration.
|
||||
// See https://docs.sourcegraph.com/dev/background-information/observability/prometheus
|
||||
github.com/prometheus/alertmanager => github.com/sourcegraph/alertmanager v0.21.1-0.20211110092431-863f5b1ee51b
|
||||
|
||||
6
go.sum
6
go.sum
@ -858,6 +858,8 @@ github.com/goware/urlx v0.3.1 h1:BbvKl8oiXtJAzOzMqAQ0GfIhf96fKeNEZfm9ocNSUBI=
|
||||
github.com/goware/urlx v0.3.1/go.mod h1:h8uwbJy68o+tQXCGZNa9D73WN8n0r9OBae5bUnLcgjw=
|
||||
github.com/grafana-tools/sdk v0.0.0-20220203092117-edae16afa87b h1:R9LID2XreyUOQfJ/NKLGuYOF4/Wz6ljmYFAhlOaHVQ4=
|
||||
github.com/grafana-tools/sdk v0.0.0-20220203092117-edae16afa87b/go.mod h1:AHHlOEv1+GGQ3ktHMlhuTUwo3zljV3QJbC0+8o2kn+4=
|
||||
github.com/grafana/regexp v0.0.0-20220202152701-6a046c4caf32 h1:M3wP8Hwic62qJsiydSgXtev03d4f92uN1I52nVjRgw0=
|
||||
github.com/grafana/regexp v0.0.0-20220202152701-6a046c4caf32/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A=
|
||||
github.com/graph-gophers/graphql-go v1.3.0 h1:Eb9x/q6MFpCLz7jBCiP/WTxjSDrYLR1QY41SORZyNJ0=
|
||||
github.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc=
|
||||
github.com/graphql-go/graphql v0.8.0 h1:JHRQMeQjofwqVvGwYnr8JnPTY0AxgVy1HpHSGPLdH0I=
|
||||
@ -1489,8 +1491,8 @@ github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e h1:qpG
|
||||
github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA=
|
||||
github.com/sourcegraph/yaml v1.0.1-0.20200714132230-56936252f152 h1:z/MpntplPaW6QW95pzcAR/72Z5TWDyDnSo0EOcyij9o=
|
||||
github.com/sourcegraph/yaml v1.0.1-0.20200714132230-56936252f152/go.mod h1:GIjDIg/heH5DOkXY3YJ/wNhfHsQHoXGjl8G8amsYQ1I=
|
||||
github.com/sourcegraph/zoekt v0.0.0-20220210200412-9d1b56e6180f h1:jBnIBqQsyTfPJ0ahWXQbRdGcSllkuhqbzCfw86AuD6Y=
|
||||
github.com/sourcegraph/zoekt v0.0.0-20220210200412-9d1b56e6180f/go.mod h1:Dx/yL46cfqqppDnXA6XwNlWi/++l+WIGs8AkJIo9cDI=
|
||||
github.com/sourcegraph/zoekt v0.0.0-20220211090549-756e833d8ebe h1:Eh4QsOq1jXT3RCwflCxHIGGvFEylFYoqZnxiK2ED1wo=
|
||||
github.com/sourcegraph/zoekt v0.0.0-20220211090549-756e833d8ebe/go.mod h1:7ch4x99rdVR1l7wn4D/LIK4q+0bkXhJUC8C37QISsDY=
|
||||
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
|
||||
github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI=
|
||||
github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"regexp"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
)
|
||||
|
||||
// Emojis returns a string of emojis that should be displayed with an issue or a pull request.
|
||||
|
||||
@ -1,10 +1,11 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"regexp"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
)
|
||||
|
||||
// Issue represents an existing GitHub Issue.
|
||||
|
||||
@ -2,10 +2,11 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"regexp"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
)
|
||||
|
||||
// RenderTrackingIssue renders the work section of the given tracking issue.
|
||||
|
||||
@ -2,7 +2,8 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"regexp"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/lib/errors"
|
||||
)
|
||||
|
||||
@ -1,10 +1,11 @@
|
||||
package comby
|
||||
|
||||
import (
|
||||
"regexp"
|
||||
"strings"
|
||||
"unicode/utf8"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/internal/lazyregexp"
|
||||
)
|
||||
|
||||
|
||||
@ -2,9 +2,10 @@ package reposource
|
||||
|
||||
import (
|
||||
"net/url"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/internal/api"
|
||||
"github.com/sourcegraph/sourcegraph/internal/extsvc"
|
||||
"github.com/sourcegraph/sourcegraph/internal/lazyregexp"
|
||||
|
||||
@ -2,9 +2,9 @@ package reposource
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
"github.com/inconshreveable/log15"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/internal/api"
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
package reposource
|
||||
|
||||
import (
|
||||
"regexp"
|
||||
"testing"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/internal/api"
|
||||
)
|
||||
|
||||
|
||||
@ -4,9 +4,10 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/url"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/internal/conf/conftypes"
|
||||
)
|
||||
|
||||
|
||||
@ -7,11 +7,11 @@ import (
|
||||
"fmt"
|
||||
"net"
|
||||
"os"
|
||||
regexpsyntax "regexp/syntax"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
regexpsyntax "github.com/grafana/regexp/syntax"
|
||||
"github.com/inconshreveable/log15"
|
||||
"github.com/keegancsmith/sqlf"
|
||||
"github.com/lib/pq"
|
||||
|
||||
@ -3,7 +3,8 @@ package github
|
||||
import (
|
||||
"flag"
|
||||
"os"
|
||||
"regexp"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/internal/extsvc/auth"
|
||||
)
|
||||
|
||||
@ -5,10 +5,10 @@ import (
|
||||
"flag"
|
||||
"net/url"
|
||||
"os"
|
||||
"regexp"
|
||||
"testing"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"github.com/grafana/regexp"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/internal/httptestutil"
|
||||
)
|
||||
|
||||
@ -8,9 +8,10 @@ package lazyregexp
|
||||
|
||||
import (
|
||||
"os"
|
||||
"regexp"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
)
|
||||
|
||||
// Regexp is a wrapper around regexp.Regexp, where the underlying regexp will be
|
||||
|
||||
@ -5,10 +5,10 @@ package pathmatch
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/gobwas/glob"
|
||||
"github.com/grafana/regexp"
|
||||
)
|
||||
|
||||
// PathMatcher reports whether the path was matched.
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
package repos
|
||||
|
||||
import (
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
)
|
||||
|
||||
// excludeFunc takes a string and returns true if it should be excluded. In
|
||||
|
||||
@ -3,9 +3,10 @@ package repos
|
||||
import (
|
||||
"flag"
|
||||
"os"
|
||||
"regexp"
|
||||
"testing"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
|
||||
"github.com/inconshreveable/log15"
|
||||
)
|
||||
|
||||
|
||||
@ -4,11 +4,11 @@ import (
|
||||
"container/heap"
|
||||
"context"
|
||||
"math/rand"
|
||||
"regexp"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
"github.com/inconshreveable/log15"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/internal/api"
|
||||
|
||||
@ -8,7 +8,6 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
"regexp"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
@ -17,6 +16,7 @@ import (
|
||||
"github.com/dnaeon/go-vcr/cassette"
|
||||
"github.com/dnaeon/go-vcr/recorder"
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"github.com/grafana/regexp"
|
||||
"github.com/inconshreveable/log15"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/internal/api"
|
||||
|
||||
@ -3,11 +3,12 @@ package backend
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"regexp"
|
||||
"sort"
|
||||
|
||||
"github.com/google/zoekt"
|
||||
"github.com/grafana/regexp"
|
||||
"github.com/inconshreveable/log15"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/schema"
|
||||
)
|
||||
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
package casetransform
|
||||
|
||||
import (
|
||||
"regexp/syntax"
|
||||
"unicode"
|
||||
"unicode/utf8"
|
||||
|
||||
"github.com/grafana/regexp/syntax"
|
||||
)
|
||||
|
||||
// LowerRegexpASCII lowers rune literals and expands char classes to include
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
package casetransform
|
||||
|
||||
import (
|
||||
"regexp/syntax"
|
||||
"testing"
|
||||
|
||||
"github.com/grafana/regexp/syntax"
|
||||
)
|
||||
|
||||
func TestLowerRegexpASCII(t *testing.T) {
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
package casetransform
|
||||
|
||||
import (
|
||||
"regexp"
|
||||
"regexp/syntax"
|
||||
"github.com/grafana/regexp"
|
||||
"github.com/grafana/regexp/syntax"
|
||||
)
|
||||
|
||||
// Regexp is a light wrapper over *regexp.Regexp that optimizes for case-insensitive search.
|
||||
|
||||
@ -2,10 +2,10 @@ package commit
|
||||
|
||||
import (
|
||||
"context"
|
||||
"regexp"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
"github.com/opentracing/opentracing-go/log"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/internal/conf"
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
package query
|
||||
|
||||
import (
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/lib/errors"
|
||||
)
|
||||
|
||||
|
||||
@ -2,9 +2,10 @@ package query
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/internal/lazyregexp"
|
||||
"github.com/sourcegraph/sourcegraph/lib/errors"
|
||||
)
|
||||
|
||||
@ -2,11 +2,11 @@ package query
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"regexp"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"github.com/grafana/regexp"
|
||||
"github.com/hexops/autogold"
|
||||
)
|
||||
|
||||
|
||||
@ -2,9 +2,10 @@ package query
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
)
|
||||
|
||||
type ExpectedOperand struct {
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
package query
|
||||
|
||||
import (
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/go-enry/go-enry/v2"
|
||||
"github.com/grafana/regexp"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/internal/search/filter"
|
||||
"github.com/sourcegraph/sourcegraph/lib/errors"
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
package query
|
||||
|
||||
import (
|
||||
"regexp"
|
||||
"strconv"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
)
|
||||
|
||||
// ValueType is the set of types of values in queries.
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
package search
|
||||
|
||||
import (
|
||||
"regexp"
|
||||
"regexp/syntax"
|
||||
"regexp/syntax" //nolint:depguard // zoekt requires this pkg
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/go-enry/go-enry/v2"
|
||||
"github.com/go-enry/go-enry/v2/data"
|
||||
"github.com/grafana/regexp"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/internal/conf"
|
||||
"github.com/sourcegraph/sourcegraph/internal/search/filter"
|
||||
|
||||
@ -3,13 +3,13 @@ package repos
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"regexp"
|
||||
regexpsyntax "regexp/syntax"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
regexpsyntax "github.com/grafana/regexp/syntax"
|
||||
"github.com/inconshreveable/log15"
|
||||
otlog "github.com/opentracing/opentracing-go/log"
|
||||
"golang.org/x/sync/errgroup"
|
||||
|
||||
@ -3,10 +3,10 @@ package searchcontexts
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"regexp"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
"github.com/inconshreveable/log15"
|
||||
"golang.org/x/sync/errgroup"
|
||||
"golang.org/x/sync/semaphore"
|
||||
|
||||
@ -3,10 +3,11 @@ package streaming
|
||||
import (
|
||||
"fmt"
|
||||
"path"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/internal/api"
|
||||
"github.com/sourcegraph/sourcegraph/internal/inventory"
|
||||
"github.com/sourcegraph/sourcegraph/internal/lazyregexp"
|
||||
|
||||
@ -3,14 +3,14 @@ package symbol
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"regexp"
|
||||
"regexp/syntax"
|
||||
"regexp/syntax" //nolint:depguard // zoekt requires this pkg
|
||||
"sort"
|
||||
"time"
|
||||
|
||||
"github.com/RoaringBitmap/roaring"
|
||||
"github.com/google/zoekt"
|
||||
zoektquery "github.com/google/zoekt/query"
|
||||
"github.com/grafana/regexp"
|
||||
"github.com/neelance/parallel"
|
||||
"github.com/opentracing/opentracing-go/ext"
|
||||
otlog "github.com/opentracing/opentracing-go/log"
|
||||
|
||||
@ -2,7 +2,7 @@ package zoekt
|
||||
|
||||
import (
|
||||
"context"
|
||||
"regexp/syntax"
|
||||
"regexp/syntax" //nolint:depguard // zoekt requires this pkg
|
||||
"time"
|
||||
|
||||
"github.com/google/zoekt"
|
||||
|
||||
@ -1,9 +1,8 @@
|
||||
package zoekt
|
||||
|
||||
import (
|
||||
"regexp"
|
||||
|
||||
zoektquery "github.com/google/zoekt/query"
|
||||
"github.com/grafana/regexp"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/internal/search"
|
||||
"github.com/sourcegraph/sourcegraph/internal/search/query"
|
||||
|
||||
@ -5,7 +5,6 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"regexp"
|
||||
"sort"
|
||||
"strconv"
|
||||
"testing"
|
||||
@ -15,6 +14,7 @@ import (
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3"
|
||||
s3types "github.com/aws/aws-sdk-go-v2/service/s3/types"
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"github.com/grafana/regexp"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/internal/observation"
|
||||
"github.com/sourcegraph/sourcegraph/lib/errors"
|
||||
|
||||
@ -8,7 +8,6 @@ import (
|
||||
"os"
|
||||
stdlibpath "path"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
@ -16,6 +15,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/golang/groupcache/lru"
|
||||
"github.com/grafana/regexp"
|
||||
"gopkg.in/src-d/go-git.v4/plumbing/format/config"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/internal/actor"
|
||||
|
||||
@ -7,13 +7,13 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
"regexp"
|
||||
"runtime"
|
||||
"sort"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"github.com/grafana/regexp"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/internal/actor"
|
||||
"github.com/sourcegraph/sourcegraph/internal/api"
|
||||
|
||||
@ -19,9 +19,10 @@ package vcs
|
||||
import (
|
||||
"fmt"
|
||||
"net/url"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/lib/errors"
|
||||
)
|
||||
|
||||
|
||||
@ -6,11 +6,11 @@ import (
|
||||
"database/sql/driver"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"regexp"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/derision-test/glock"
|
||||
"github.com/grafana/regexp"
|
||||
"github.com/inconshreveable/log15"
|
||||
"github.com/keegancsmith/sqlf"
|
||||
"github.com/opentracing/opentracing-go/log"
|
||||
|
||||
@ -2,7 +2,8 @@ package inference
|
||||
|
||||
import (
|
||||
"context"
|
||||
"regexp"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
)
|
||||
|
||||
type GitClient interface {
|
||||
|
||||
@ -2,7 +2,8 @@ package inference
|
||||
|
||||
import (
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/lib/codeintel/autoindex/config"
|
||||
)
|
||||
|
||||
@ -2,9 +2,10 @@ package inference
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"regexp"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
)
|
||||
|
||||
type PathTestCase = struct {
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
package inference
|
||||
|
||||
import (
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/lib/codeintel/autoindex/config"
|
||||
)
|
||||
|
||||
|
||||
@ -4,8 +4,9 @@ package inference
|
||||
|
||||
import (
|
||||
"context"
|
||||
"regexp"
|
||||
"sync"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
)
|
||||
|
||||
// MockGitClient is a mock implementation of the GitClient interface (from
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
package inference
|
||||
|
||||
import (
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
)
|
||||
|
||||
// Patterns is a regular expression that matches any input that would also match
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package inference
|
||||
|
||||
import (
|
||||
"regexp"
|
||||
"github.com/grafana/regexp"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/lib/codeintel/autoindex/config"
|
||||
)
|
||||
|
||||
@ -2,7 +2,8 @@ package inference
|
||||
|
||||
import (
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
|
||||
"github.com/grafana/regexp"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/lib/codeintel/autoindex/config"
|
||||
)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user