zoekt: 28 files / 243 matches / 0.84ms neogrok: 20 files / 129 matches

github.com/sourcegraph/zoektbuild/testdata/example.cc 13 matches | C++ | №1

8 9 struct FooStruct { }; // LF_STRUCTURE10 11 class FooClass { // LF_CLASS12 public:
33 34 void *FooClass::StaticMember = nullptr;35 36 class Inherit : public FooClass { // LF_BCLASS37 public:
41 42 class VInherit : public virtual FooClass { // LF_VBCLASS43

github.com/sourcegraph/zoektweb/templates.go 9 matches | Go | №2

168 <dt><a href="search?q=path+-file:java">path -file:java</a></dt><dd>search for the word "path" excluding files whose name contains "java"</dd>169 <dt><a href="search?q=foo.*bar">foo.*bar</a></dt><dd>search for the regular expression "foo.*bar"</dd>170 <dt><a href="search?q=-%28Path File%29 Stream">-(Path File) Stream</a></dt><dd>search "Stream", but exclude files containing both "Path" and "File"</dd>
191 <div class="container">192 {{template "footerBoilerplate"}}193 <p class="navbar-text navbar-right">
202 `,203 "footerBoilerplate": `<a class="navbar-text" href="about">About</a>`,204 "results": `

github.com/isker/neogroksrc/routes/(opengrok-compat)/search/opengrok-lucene.server.ts 3 matches | TypeScript | №3

261 *262 * defs(foo || bar) => sym:foo or sym:bar263 *
355 // @ts-expect-error proximity is missing from the types, but can be356 // produced with something like `"foo bar"~10`357 proximity,

github.com/sourcegraph/zoektapi_test.go 3 matches | Go | №4

98 ChunkMatches: []ChunkMatch{{ // 24 bytes + 208 bytes (see TestSizeByteChunkMatches)99 Content: []byte("foo"),100 ContentStart: Location{},
127 cm := ChunkMatch{128 Content: []byte("foo"), // 24 + 3 bytes129 ContentStart: Location{}, // 12 bytes
288 b := a289 b.RawConfig = map[string]string{"foo": "bar"}290 mutated, err := a.MergeMutable(&b)

github.com/sourcegraph/zoektindex_test.go 9 matches | Go | №5

489 Q: &query.Substring{490 Pattern: "foo",491 Content: true,
501 &query.Substring{502 Pattern: "foo",503 Content: true,
514 ShardsSkippedFilter: 1,515 NgramLookups: 3, // we lookedup "foo" once (1), but lookedup and created "a y" (2).516 },
1050 Document{Name: "helpers.go", Content: []byte("x apple y")},1051 Document{Name: "foo", Content: []byte("x apple y")})1052
1422 &query.Substring{Pattern: "needle"},1423 &query.Repo{Regexp: regexp.MustCompile("foo")},1424 ))

github.com/sourcegraph/zoektscore_test.go 4 matches | Go | №6

14 cands: []*candidateMatch{15 {substrLowered: []byte("foo")},16 {substrLowered: []byte("foo")},17 {substrLowered: []byte("bar")},
23 wantDF: termDocumentFrequency{24 "foo": 1,25 "bar": 1,
28 wantTermFrequencies: map[string]int{29 "foo": 2,30 "bar": 1,

github.com/sourcegraph/zoektbuild/e2e_test.go 24 matches | Go | №7

504 {505 Name: "foo_test.go",506 Content: []byte("bla"),
608 var (609 fooAtMain = zoekt.Document{Name: "foo.go", Branches: []string{"main"}, Content: []byte("common foo-main-v1")}610 fooAtMainV2 = zoekt.Document{Name: "foo.go", Branches: []string{"main"}, Content: []byte("common foo-main-v2")}611 612 fooAtMainAndRelease = zoekt.Document{Name: "foo.go", Branches: []string{"main", "release"}, Content: []byte("common foo-main-and-release")}

github.com/sourcegraph/zoektmatchtree_test.go 8 matches | Go | №8

166 }{167 {query: "^foo", skip: false},168 {query: "foo", skip: true},169 {query: "thread|needle|haystack", skip: true},
202 func TestWordSearchSkipRegexpTree(t *testing.T) {203 qStr := "\\bfoo\\b case:yes"204 q, err := query.Parse(qStr)
312 d := &indexData{313 repoMetaData: []Repository{{Name: "foo"}, {Name: "bar"}},314 fileBranchMasks: []uint64{1, 1, 1, 1, 1},
336 repoMetaData: []Repository{337 {ID: hash("foo"), Name: "foo"},338 {ID: hash("bar"), Name: "bar"},

github.com/sourcegraph/zoektjson/json_test.go 1 match | Go | №9

34 ID: 2,35 Name: "foo/bar",36 },

github.com/sourcegraph/zoektbuild/ctags_test.go 5 matches | Go | №10

26 func TestTagsToSections(t *testing.T) {27 c := []byte("package foo\nfunc bar(j int) {}\n//bla")28 // ----------01234567890 1234567890123456789 012345
47 func TestTagsToSectionsMultiple(t *testing.T) {48 c := []byte("class Foo { int x; int b; }")49 // ----------012345678901234567890123456
76 func TestTagsToSectionsReverse(t *testing.T) {77 c := []byte("typedef enum { FOO, BAR } bas\n")78 // ----------01234567890123456789012345678
85 {86 Name: "FOO",87 Line: 1,
110 func TestTagsToSectionsEOF(t *testing.T) {111 c := []byte("package foo\nfunc bar(j int) {}")112 // ----------01234567890 1234567890123456789 012345

github.com/sourcegraph/zoektquery/query_test.go 8 matches | Go | №11

89 func TestMap(t *testing.T) {90 in := NewAnd(&Substring{Pattern: "bla"}, &Not{&Repo{Regexp: regexp.MustCompile("foo")}})91 out := NewAnd(&Substring{Pattern: "bla"}, &Not{&Const{false}})
116 func TestExpandFileContent(t *testing.T) {117 re, _ := syntax.Parse("foo", syntax.Perl)118
141 q: &Regexp{Regexp: re, FileName: true, Content: true},142 want: "(or file_regex:\"foo\" regex:\"foo\")",143 },
145 q: &Regexp{Regexp: re, FileName: false, Content: false},146 want: "(or file_regex:\"foo\" regex:\"foo\")",147 },

github.com/sourcegraph/zoektquery/parse_test.go 1 match | Go | №12

120 {"\"a\\", nil},121 {"case:foo", nil},122

github.com/sourcegraph/zoektquery/regexp_test.go 2 matches | Go | №13

54 func TestLowerRegexp(t *testing.T) {55 in := "[a-zA-Z]fooBAR"56 re := mustParseRE(in)
58 got := LowerRegexp(re)59 want := "[a-za-z]foobar"60 if got.String() != want {

github.com/sourcegraph/zoektbuild/scoring_test.go 2 matches | Go | №14

330 content: exampleCpp,331 query: &query.Substring{Content: true, Pattern: "FooClass"},332 language: "C++",
354 content: exampleCpp,355 query: &query.Substring{Content: true, Pattern: "FooStruct"},356 language: "C++",

github.com/sourcegraph/zoektignore/ignore_test.go 8 matches | Go | №15

17 {18 ignoreFile: []byte("# ignore this \n \n foo\n bar/"),19 wantIgnoreList: []glob.Glob{20 glob.MustCompile("foo**", '/'),21 glob.MustCompile("bar/**", '/'),
24 {25 ignoreFile: []byte("/foo/bar \n /qux \n *.go\nfoo.go"),26 wantIgnoreList: []glob.Glob{27 glob.MustCompile("foo/bar**", '/'),28 glob.MustCompile("qux**", '/'),

github.com/sourcegraph/zoektshards/watcher_test.go 9 matches | Go | №16

60 61 shard := filepath.Join(dir, "foo.zoekt")62 if err := os.WriteFile(shard, []byte("hello"), 0o644); err != nil {
150 },151 "foo": {152 name: "foo",153 version: 0,154 },155 "foo_bar": {156 name: "foo_bar",157 version: 0,

github.com/sourcegraph/zoektquery/query_proto_test.go 5 matches | Go | №17

14 &Regexp{15 Regexp: regexpMustParse("foo"),16 FileName: true,
31 &Repo{32 Regexp: regexp.MustCompile("github.com/foo/bar"),33 },34 &RepoRegexp{35 Regexp: regexp.MustCompile("github.com/foo.*"),36 },
80 Children: []Q{81 &Substring{Pattern: "foo"},82 &Substring{Pattern: "bar"},
84 },85 &Substring{Pattern: "foo bar"},86 },

github.com/sourcegraph/zoektcmd/zoekt-webserver/grpc/server/server_test.go 2 matches | Go | №18

34 {FileName: "bin.go"},35 {FileName: "foo.go"},36 },
44 ID: 2,45 Name: "foo/bar",46 },

github.com/sourcegraph/zoektcmd/zoekt-sourcegraph-indexserver/index_test.go 12 matches | Go | №19

172 Symbols: true,173 LargeFiles: []string{"foo", "bar"},174 },
178 Symbols: true,179 LargeFiles: []string{"foo", "bar"},180 },
187 Symbols: true,188 LargeFiles: []string{"foo", "bar"},189 },
193 Symbols: true,194 LargeFiles: []string{"foo", "bar"},195 },
356 Symbols: true,357 LargeFiles: []string{"foo", "bar"},358 },

github.com/sourcegraph/zoektcmd/zoekt-sourcegraph-indexserver/merge_test.go 1 match | Go | №20

26 {"small.00000.zoekt", false},27 {"compound-foo.00000.zoekt", false},28 {"else", false},