zoekt: 28 files / 244 matches / 1.35ms neogrok: 20 files / 122 matches

github.com/sourcegraph/zoektinternal/e2e/examples/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/sourcegraph/zoektdoc/query_syntax.md 6 matches | Markdown | №3

28 | `archived:` | `a:` | `yes` or `no` | Filters archived repositories. | `archived:yes` |29 | `case:` | `c:` | `yes`, `no`, or `auto` | Matches case-sensitive or insensitive text. | `case:yes content:"Foo"` |30 | `content:` | `c:` | Text (string or regex) | Searches content of files. | `content:"search term"` |
34 | `public:` | | `yes` or `no` | Filters public repositories. | `public:yes` |35 | `regex:` | | Regex pattern | Matches content using a regular expression. | `regex:/foo.*bar/` |36 | `repo:` | `r:` | Text (string or regex) | Filters repositories by name. | `repo:"github.com/user/project"` |
102 #### Examples:103 - Match the string `foo"bar`:104 ```plaintext105 content:"foo\"bar"106 ```107 - Match the regex `foo.*bar`:108 ```plaintext109 content:/foo.*bar/110 ```

github.com/sourcegraph/zoektinternal/e2e/examples/example.py 2 matches | Python | №4

48 49 # vvv recursive.foo ref,nodef50 recursive = recursive.foo51

github.com/sourcegraph/zoektinternal/e2e/examples/example.scala 3 matches | Scala | №5

25 * Index split on buckets per dialect in order to have a constant time26 * and low memory footprint to infer dialect for SymbolDefinition because27 * it's used in WorkspaceSymbolProvider
134 135 // Returns true if symbol is com/foo/Bar# and path is /com/foo/Bar.scala136 // Such symbols are "trivial" because their definition location can be computed

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

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
282 b := a283 b.RawConfig = map[string]string{"foo": "bar"}284 mutated, err := a.MergeMutable(&b)

github.com/sourcegraph/zoektindex/index_test.go 9 matches | Go | №7

493 Q: &query.Substring{494 Pattern: "foo",495 Content: true,
505 &query.Substring{506 Pattern: "foo",507 Content: true,
518 ShardsSkippedFilter: 1,519 NgramLookups: 3, // we lookedup "foo" once (1), but lookedup and created "a y" (2).520 },
1136 Document{Name: "helpers.go", Content: []byte("x apple y")},1137 Document{Name: "foo", Content: []byte("x apple y")})1138
1508 &query.Substring{Pattern: "needle"},1509 &query.Repo{Regexp: regexp.MustCompile("foo")},1510 ))

github.com/sourcegraph/zoektindex/ctags_test.go 5 matches | Go | №8

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

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

103 func TestMap(t *testing.T) {104 in := NewAnd(&Substring{Pattern: "bla"}, &Not{&Repo{Regexp: regexp.MustCompile("foo")}})105 out := NewAnd(&Substring{Pattern: "bla"}, &Not{&Const{false}})
130 func TestExpandFileContent(t *testing.T) {131 re, _ := syntax.Parse("foo", syntax.Perl)132
155 q: &Regexp{Regexp: re, FileName: true, Content: true},156 want: "(or file_regex:\"foo\" regex:\"foo\")",157 },
159 q: &Regexp{Regexp: re, FileName: false, Content: false},160 want: "(or file_regex:\"foo\" regex:\"foo\")",161 },

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

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

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

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/zoektignore/ignore_test.go 8 matches | Go | №12

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/zoektindex/matchtree_test.go 8 matches | Go | №13

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

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

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/zoektinternal/json/json_test.go 1 match | Go | №15

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

github.com/sourcegraph/zoektinternal/e2e/scoring_test.go 2 matches | Go | №16

377 content: exampleCpp,378 query: &query.Substring{Content: true, Pattern: "FooClass"},379 language: "C++",
401 content: exampleCpp,402 query: &query.Substring{Content: true, Pattern: "FooStruct"},403 language: "C++",

github.com/sourcegraph/zoektinternal/e2e/e2e_index_test.go 23 matches | Go | №17

614 var (615 fooAtMain = index.Document{Name: "foo.go", Branches: []string{"main"}, Content: []byte("common foo-main-v1")}616 fooAtMainV2 = index.Document{Name: "foo.go", Branches: []string{"main"}, Content: []byte("common foo-main-v2")}617 618 fooAtMainAndRelease = index.Document{Name: "foo.go", Branches: []string{"main", "release"}, Content: []byte("common foo-main-and-release")}619

github.com/sourcegraph/zoektinternal/shards/watcher_test.go 9 matches | Go | №18

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/isker/neogroksrc/routes/(opengrok-compat)/search/opengrok-lucene.server.ts 3 matches | TypeScript | №19

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/zoektcmd/zoekt-webserver/grpc/server/server_test.go 2 matches | Go | №20

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