zoekt: 28 files / 200 matches / 0.59ms neogrok: 20 files / 127 matches

neogrokinternal/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

neogrokdoc/design.md 2 matches | Markdown | №2

250 251 (sym:foo) => Symbol:"foo"252 (file:java) => Substring_file:"java"

neogrokweb/templates.go 9 matches | Go | №3

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": `

neogrokdoc/query_syntax.md 9 matches | Markdown | №4

30 | `archived:` | | `yes` or `no` | Filters archived repositories. | `archived:yes` |31 | `case:` | | `yes`, `no`, or `auto` | Matches case-sensitive or insensitive text. | `case:yes content:"Foo"` |32 | `content:` | `c:` | Regex pattern | Searches content of files. | `content:"search term"` |
37 | `public:` | | `yes` or `no` | Filters public repositories. | `public:yes` |38 | `regex:` | | Regex pattern | Matches content using a regular expression. | `regex:foo.*bar` |39 | `repo:` | `r:` | Regex pattern | Filters repositories by name. | `repo:github\.com/user/project$` |
132 `type:` applies to the whole expression in its current scope, including `or`133 clauses. For example, `type:repo foo or bar` is equivalent to134 `type:repo (foo or bar)`. Use parentheses to scope `type:` to only one branch,135 for example `(type:repo foo) or bar`.136

neogroklanguages/extensions.go 2 matches | Go | №5

176 for ext := range overrideAmbiguousExtensionsMap {177 langs := enry.GetLanguagesByExtension("foo"+ext, nil, nil)178 for _, lang := range langs {
189 considered[lang] = struct{}{}190 langs := enry.GetLanguagesByExtension("foo"+specialOverrideExt, nil, nil)191 for _, lang := range langs {

neogrokinternal/e2e/examples/example.py 2 matches | Python | №6

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

neogrokinternal/e2e/examples/example.scala 3 matches | Scala | №7

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

neogrokapi_test.go 3 matches | Go | №8

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

neogrokindex/index_test.go 9 matches | Go | №9

600 Q: &query.Substring{601 Pattern: "foo",602 Content: true,
612 &query.Substring{613 Pattern: "foo",614 Content: true,
625 ShardsSkippedFilter: 1,626 NgramLookups: 3, // we lookedup "foo" once (1), but lookedup and created "a y" (2).627 },
1243 Document{Name: "helpers.go", Content: []byte("x apple y")},1244 Document{Name: "foo", Content: []byte("x apple y")})1245
1679 &query.Substring{Pattern: "needle"},1680 &query.Repo{Regexp: regexp.MustCompile("foo")},1681 ))

neogrokindex/ctags_test.go 5 matches | Go | №10

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

neogrokquery/query_test.go 8 matches | Go | №11

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 },

neogrokquery/parse_test.go 23 matches | Go | №12

118 )},119 {"(foo case:yes) bar", NewAnd(120 &Substring{Pattern: "foo", CaseSensitive: true},121 &Substring{Pattern: "bar"},122 )},123 {"(case:yes foo) bar", NewAnd(124 &Substring{Pattern: "foo", CaseSensitive: true},125 &Substring{Pattern: "bar"},126 )},127 {"(case:yes foo (bar))", NewAnd(128 &Substring{Pattern: "foo", CaseSensitive: true},129 &Substring{Pattern: "bar", CaseSensitive: true},

neogrokquery/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 {

neogrokignore/ignore_test.go 8 matches | Go | №14

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**", '/'),

neogroksearch/watcher_test.go 10 matches | Go | №15

51 dir := t.TempDir()52 shard := filepath.Join(dir, "foo.zoekt")53 meta := shard + ".meta"
126 127 shard := filepath.Join(dir, "foo.zoekt")128 if err := os.WriteFile(shard, []byte("hello"), 0o644); err != nil {
221 },222 "foo": {223 name: "foo",224 version: 0,225 },226 "foo_bar": {227 name: "foo_bar",228 version: 0,

neogrokquery/query_proto_test.go 5 matches | Go | №16

14 &Regexp{15 Regexp: regexpMustParse("foo"),16 FileName: true,
29 &Repo{30 Regexp: regexp.MustCompile("github.com/foo/bar"),31 },32 &RepoRegexp{33 Regexp: regexp.MustCompile("github.com/foo.*"),34 },
78 Children: []Q{79 &Substring{Pattern: "foo"},80 &Substring{Pattern: "bar"},
82 },83 &Substring{Pattern: "foo bar"},84 },

neogrokinternal/json/json_test.go 1 match | Go | №17

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

neogrokindex/file_category_test.go 5 matches | Go | №18

15 name: "test file",16 filename: "foo_test.go",17 content: []byte("package foo"),18 want: FileCategoryTest,
21 name: "vendor file",22 filename: "vendor/foo.go",23 content: []byte("package foo"),24 want: FileCategoryVendored,
27 name: "generated file",28 filename: "foo.go",29 content: []byte("// Code generated by protoc-gen-go. DO NOT EDIT.\n" +

neogrokinternal/e2e/scoring_test.go 2 matches | Go | №19

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++",

neogroklanguages/extensions_test.go 6 matches | Go | №20

95 for ext, language := range unsupportedByEnryExtensionToNameMap {96 filename := "foo" + ext97 languages, _ := getLanguagesByExtension(filename)
104 for ext, language := range overrideAmbiguousExtensionsMap {105 filename := "foo" + ext106 enryLangs := enry.GetLanguagesByExtension(filename, nil, nil)
117 for ext, language := range nonAmbiguousExtensionsCheck {118 filename := "foo" + ext119 languages, isLikelyBinaryFile := getLanguagesByExtension(filename)
127 for _, ext := range []string{".png", ".jpg", ".gif"} {128 filename := "foo" + ext129 _, isLikelyBinary := getLanguagesByExtension(filename)
137 for ext, overrideLang := range overrideAmbiguousExtensionsMap {138 filepath := "foo" + ext139 enryLangsForExt := enry.GetLanguagesByExtension(filepath, nil, nil)