You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: domain/snyk/issues.go
+9-2Lines changed: 9 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,6 @@ import (
26
26
"github.com/snyk/snyk-ls/internal/delta"
27
27
"github.com/snyk/snyk-ls/internal/product"
28
28
"github.com/snyk/snyk-ls/internal/types"
29
-
"github.com/snyk/snyk-ls/internal/util"
30
29
)
31
30
32
31
var (
@@ -53,6 +52,8 @@ type Issue struct {
53
52
Messagestring
54
53
// todo [jc] this contains a formatted longest message for hovers, this needs to be pushed up and rendered in presentation. [bd] shouldn't the content and formatting be decided by the product?
55
54
FormattedMessagestring
55
+
// ContentRoot is the root directory where is the issue was found
56
+
ContentRoot types.FilePath
56
57
// AffectedFilePath is the file path to the file where the issue was found
57
58
AffectedFilePath types.FilePath
58
59
// Product is the Snyk product, e.g. Snyk Open Source
@@ -94,6 +95,7 @@ func (i *Issue) Clone() *Issue {
94
95
Message: i.Message,
95
96
FormattedMessage: i.FormattedMessage,
96
97
AffectedFilePath: i.AffectedFilePath,
98
+
ContentRoot: i.ContentRoot,
97
99
Product: i.Product,
98
100
References: i.References,
99
101
IssueDescriptionURL: i.IssueDescriptionURL,
@@ -190,6 +192,12 @@ func (i *Issue) GetID() string {
190
192
returni.ID
191
193
}
192
194
195
+
func (i*Issue) GetContentRoot() types.FilePath {
196
+
i.m.RLock()
197
+
deferi.m.RUnlock()
198
+
returni.ContentRoot
199
+
}
200
+
193
201
func (i*Issue) GetDescription() string {
194
202
i.m.RLock()
195
203
deferi.m.RUnlock()
@@ -328,7 +336,6 @@ func (i *Issue) SetFingerPrint(fingerprint string) {
0 commit comments