fork of https://github.com/sourcegraph/zoekt
0

Configure Feed

Select the types of activity you want to include in your feed.

scoring: handle scip-ctags kinds (#655)

There are likely more that we are missing. We only briefly looked at
golang, likely other languages are also affected. The regression is
scip-ctags returning different values for kind.

Will follow-up with a more comprehensive workaround until scip-ctags
issues are resolved.

Test Plan: manually tested queries like "test server" against the golang
repo until the test server struct was the top result.

Co-authored-by: Stefan Hengl <stefan@sourcegraph.com>

+15
+15
contentprovider.go
··· 660 660 661 661 // Generic ranking which will be overriden by language specific ranking 662 662 switch kind { 663 + case "type": // scip-ctags regression workaround https://github.com/sourcegraph/sourcegraph/issues/57659 664 + factor = 8 663 665 case "class": 664 666 factor = 10 665 667 case "struct": ··· 721 723 } 722 724 case "Go", "go": 723 725 switch kind { 726 + // scip-ctags regression workaround https://github.com/sourcegraph/sourcegraph/issues/57659 727 + // for each case a description of the fields in ctags in the comment 728 + case "type": // interface struct talias 729 + factor = 10 730 + case "method": // methodSpec 731 + factor = 8.5 732 + case "function": // func 733 + factor = 8 734 + case "variable": // var member 735 + factor = 7 736 + case "constant": // const 737 + factor = 6 738 + 724 739 case "interface": // interfaces 725 740 factor = 10 726 741 case "struct": // structs