Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
pname = "scip-go";
inherit version;
src = ./.;
vendorHash = "sha256-idw8+09nW4CUouoYSAQlRfbrc3Dif1BZcwvmYrM3mr0=";
vendorHash = "sha256-8Pp5up/N+v8VqXWHqPXSDSuI9Wwii9FLGAxmHFoxF00=";
subPackages = [ "cmd/scip-go" ];
env.CGO_ENABLED = 0;
checkPhase = "go test ./...";
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.25.0

require (
github.com/alecthomas/kong v1.15.0
github.com/scip-code/scip/bindings/go/scip v0.7.1
github.com/scip-code/scip/bindings/go/scip v0.8.0
golang.org/x/mod v0.36.0
golang.org/x/tools v0.45.0
golang.org/x/tools/go/vcs v0.1.0-deprecated
Expand All @@ -13,7 +13,7 @@ require (

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fatih/color v1.18.0 // indirect
github.com/fatih/color v1.19.0 // indirect
github.com/hexops/gotextdiff v1.0.3 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM=
github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU=
github.com/fatih/color v1.19.0 h1:Zp3PiM21/9Ld6FzSKyL5c/BULoe/ONr9KlbYVOfG8+w=
github.com/fatih/color v1.19.0/go.mod h1:zNk67I0ZUT1bEGsSGyCZYZNrHuTkJJB+r6Q9VuMi0LE=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
Expand All @@ -28,6 +30,8 @@ github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0t
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
github.com/scip-code/scip/bindings/go/scip v0.7.1 h1:x2QVP2nO09TFUGVrNJ+8XakD45KyXn/tSalzAELcB3Q=
github.com/scip-code/scip/bindings/go/scip v0.7.1/go.mod h1:XC4dP3um0lKaSDRFIMwYlkBjFxKy1Rw7xFt6KDtRjAk=
github.com/scip-code/scip/bindings/go/scip v0.8.0 h1:WdmhYzDbzgCe8D1PhS61VtFsa+/w+MUAv1Hs7kon0Mo=
github.com/scip-code/scip/bindings/go/scip v0.8.0/go.mod h1:QhuSgP19HyWJIU/bvfBGn/RmkL/BX2IPoZWTNQ9M5wY=
github.com/sourcegraph/beaut v0.0.0-20240611013027-627e4c25335a h1:j/CQ27s679M9wRGBRJYyXGrfkYuQA6VMnD7R08mHD9c=
github.com/sourcegraph/beaut v0.0.0-20240611013027-627e4c25335a/go.mod h1:JG1sdvGTKWwe/oH3/3UKQ26vfcHIN//7fwEJhoqaBcM=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
Expand Down
4 changes: 2 additions & 2 deletions internal/document/document.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func (d *Document) SetNewSymbolForPos(
) {
var displayName string
var documentation []string
var sigDoc *scip.Document
var sigDoc *scip.Signature
var def types.Object

if ident != nil {
Expand All @@ -116,7 +116,7 @@ func (d *Document) SetNewSymbolForPos(
def = d.pkg.TypesInfo.Defs[ident]
if def != nil {
if signature := typeStringForObject(def); signature != "" {
sigDoc = &scip.Document{
sigDoc = &scip.Signature{
Language: "go",
Text: signature,
}
Expand Down
2 changes: 1 addition & 1 deletion internal/index/scip.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ func indexVisitPackages(
Kind: scip.SymbolInformation_Package,
DisplayName: pkg.Name,
Documentation: findPackageDocs(pkg),
SignatureDocumentation: &scip.Document{
SignatureDocumentation: &scip.Signature{
Language: "go",
Text: "package " + pkg.Name,
},
Expand Down
2 changes: 1 addition & 1 deletion internal/visitors/visitor_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ func (v *fileVisitor) ToScipDocument() *scip.Document {
// type recorded in caseClauses nondeterministic.
if _, isTypeSwitchLocal := v.caseClauses[obj.Pos()]; !isTypeSwitchLocal {
if txt := local.SignatureText(); txt != "" {
symbolInfo.SignatureDocumentation = &scip.Document{
symbolInfo.SignatureDocumentation = &scip.Signature{
Language: "go",
Text: txt,
}
Expand Down
Loading