Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scoring: handle scip-ctags kinds #655

Merged
merged 1 commit into from
Oct 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions contentprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,8 @@ func scoreKind(language string, kind string) float64 {

// Generic ranking which will be overriden by language specific ranking
switch kind {
case "type": // scip-ctags regression workaround https://github.com/sourcegraph/sourcegraph/issues/57659
factor = 8
case "class":
factor = 10
case "struct":
Expand Down Expand Up @@ -721,6 +723,19 @@ func scoreKind(language string, kind string) float64 {
}
case "Go", "go":
switch kind {
// scip-ctags regression workaround https://github.com/sourcegraph/sourcegraph/issues/57659
// for each case a description of the fields in ctags in the comment
case "type": // interface struct talias
factor = 10
case "method": // methodSpec
factor = 8.5
case "function": // func
factor = 8
case "variable": // var member
factor = 7
case "constant": // const
factor = 6

case "interface": // interfaces
factor = 10
case "struct": // structs
Expand Down
Loading