​

zoekt: 28 files / 211 matches / 0.83ms neogrok: 20 files / 155 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

182 for ext := range overrideAmbiguousExtensionsMap {183 langs := enry.GetLanguagesByExtension("foo"+ext, nil, nil)184 for _, lang := range langs {
195 considered[lang] = struct{}{}196 langs := enry.GetLanguagesByExtension("foo"+specialOverrideExt, nil, nil)197 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 17 matches | Go | №9

435 searcher := searcherForTest(t, testShardBuilder(t, nil,436 Document{Name: "foo.go", Content: []byte("func foo() {}")},437 ))
444 }{445 {q: "type:file foo", wantFiles: 1},446 {q: "type:filematch foo", wantFiles: 1},447 {q: "type:repo foo", wantErr: true},448 } {

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

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

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

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

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

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)

neogrokinternal/e2e/e2e_index_test.go 23 matches | Go | №20

559 var (560 fooAtMain = index.Document{Name: "foo.go", Branches: []string{"main"}, Content: []byte("common foo-main-v1")}561 fooAtMainV2 = index.Document{Name: "foo.go", Branches: []string{"main"}, Content: []byte("common foo-main-v2")}562 563 fooAtMainAndRelease = index.Document{Name: "foo.go", Branches: []string{"main", "release"}, Content: []byte("common foo-main-and-release")}564