zoekt: 31 files / 260 matches / 0.92ms neogrok: 20 files / 130 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

174 <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>175 <dt><a href="search?q=foo.*bar">foo.*bar</a></dt><dd>search for the regular expression "foo.*bar"</dd>176 <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>
197 <div class="container">198 {{template "footerBoilerplate"}}199 <p class="navbar-text navbar-right">
208 `,209 "footerBoilerplate": `<a class="navbar-text" href="about">About</a>`,210 "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"` |
129 #### Examples:130 - Match the string `foo"bar`:131 ```plaintext132 content:"foo\"bar"133 ```134 - Match the regex `foo.*bar`:135 ```plaintext136 content:/foo.*bar/137 ```

github.com/sourcegraph/zoektlanguages/extensions.go 2 matches | Go | №4

171 for ext := range overrideAmbiguousExtensionsMap {172 langs := enry.GetLanguagesByExtension("foo"+ext, nil, nil)173 for _, lang := range langs {
184 considered[lang] = struct{}{}185 langs := enry.GetLanguagesByExtension("foo"+specialOverrideExt, nil, nil)186 for _, lang := range langs {

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

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

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

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 | №7

99 ChunkMatches: []ChunkMatch{{ // 24 bytes + 208 bytes (see TestSizeByteChunkMatches)100 Content: []byte("foo"),101 ContentStart: Location{},
128 cm := ChunkMatch{129 Content: []byte("foo"), // 24 + 3 bytes130 ContentStart: Location{}, // 12 bytes
283 b := a284 b.RawConfig = map[string]string{"foo": "bar"}285 mutated, err := a.MergeMutable(&b)

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

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

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

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 | №10

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 11 matches | Go | №11

120 {"\"a\\", nil},121 {"case:foo", nil},122
134 {")))", nil},135 {"foo)", nil},136 {"foo))", nil},137 {"foo)))", nil},138 {"(foo", nil},139 {"((foo", nil},140 {"(((foo", nil},141 {"(foo))", nil},142 {"(((foo))", nil},143

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

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 | №13

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/zoektsearch/watcher_test.go 9 matches | Go | №14

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 | №15

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 | №16

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

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

423 content: exampleCpp,424 query: &query.Substring{Content: true, Pattern: "FooClass"},425 language: "C++",
447 content: exampleCpp,448 query: &query.Substring{Content: true, Pattern: "FooStruct"},449 language: "C++",

github.com/sourcegraph/zoektlanguages/extensions_test.go 6 matches | Go | №18

89 for ext, language := range unsupportedByEnryExtensionToNameMap {90 filename := "foo" + ext91 languages, _ := getLanguagesByExtension(filename)
98 for ext, language := range overrideAmbiguousExtensionsMap {99 filename := "foo" + ext100 enryLangs := enry.GetLanguagesByExtension(filename, nil, nil)
111 for ext, language := range nonAmbiguousExtensionsCheck {112 filename := "foo" + ext113 languages, isLikelyBinaryFile := getLanguagesByExtension(filename)
121 for _, ext := range []string{".png", ".jpg", ".gif"} {122 filename := "foo" + ext123 _, isLikelyBinary := getLanguagesByExtension(filename)
131 for ext, overrideLang := range overrideAmbiguousExtensionsMap {132 filepath := "foo" + ext133 enryLangsForExt := enry.GetLanguagesByExtension(filepath, nil, nil)

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/zoektinternal/e2e/e2e_index_test.go 23 matches | Go | №20

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