Skip to content

Commit c08995e

Browse files
authored
chore: correction on diagnostic example in readme (#699)
1 parent b1c4fb1 commit c08995e

File tree

2 files changed

+43
-47
lines changed

2 files changed

+43
-47
lines changed

README.md

+42-46
Original file line numberDiff line numberDiff line change
@@ -74,23 +74,21 @@ Right now the language server supports the following actions:
7474
"message": "Message",
7575
"tags": ["security"],
7676
"data": {
77-
"scanIssue": {
78-
"id": "123",
79-
"issueType": "vulnerability",
80-
"packageName": "packageName",
81-
"packageVersion": "packageVersion",
82-
"issue": "issue",
83-
"additionalData": {
84-
"ruleId": "ruleId",
85-
"identifiers": {
86-
"cwe": ["cwe"],
87-
"cve": ["cve"]
88-
},
89-
"description": "description",
90-
"language": "language",
91-
"packageManager": "packageManager",
92-
"packageName": "packageName"
93-
}
77+
"id": "123",
78+
"issueType": "vulnerability",
79+
"packageName": "packageName",
80+
"packageVersion": "packageVersion",
81+
"issue": "issue",
82+
"additionalData": {
83+
"ruleId": "ruleId",
84+
"identifiers": {
85+
"cwe": ["cwe"],
86+
"cve": ["cve"]
87+
},
88+
"description": "description",
89+
"language": "language",
90+
"packageManager": "packageManager",
91+
"packageName": "packageName"
9492
}
9593
}
9694
}
@@ -113,35 +111,33 @@ Right now the language server supports the following actions:
113111
"message": "Message",
114112
"tags": ["security"],
115113
"data": {
116-
"scanIssue": {
117-
"id": "123",
118-
"filePath": "filePath",
119-
"range": {
120-
"start": { "line": 1, "character": 0 },
121-
"end": { "line": 2, "character": 0 },
122-
},
123-
"additionalData": {
124-
"message": "message",
125-
"rule": "rule",
126-
"ruleId": "ruleId",
127-
"dataFlow": [
128-
{
129-
"filePath": "filePath",
130-
"range": {
131-
"start": { "line": 1, "character": 0 },
132-
"end": { "line": 2, "character": 0 },
133-
},
134-
}
135-
],
136-
"exampleCommitFixes": [
137-
{
138-
"commit": "commit",
139-
"diff": "diff"
140-
}
141-
],
142-
"cwe": "cwe",
143-
"isSecurityType": true
144-
}
114+
"id": "123",
115+
"filePath": "filePath",
116+
"range": {
117+
"start": { "line": 1, "character": 0 },
118+
"end": { "line": 2, "character": 0 },
119+
},
120+
"additionalData": {
121+
"message": "message",
122+
"rule": "rule",
123+
"ruleId": "ruleId",
124+
"dataFlow": [
125+
{
126+
"filePath": "filePath",
127+
"range": {
128+
"start": { "line": 1, "character": 0 },
129+
"end": { "line": 2, "character": 0 },
130+
},
131+
}
132+
],
133+
"exampleCommitFixes": [
134+
{
135+
"commit": "commit",
136+
"diff": "diff"
137+
}
138+
],
139+
"cwe": "cwe",
140+
"isSecurityType": true
145141
}
146142
}
147143
}

application/server/server_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ func Test_initialize_handlesUntrustedFoldersWhenAuthenticated(t *testing.T) {
680680
}
681681

682682
assert.Nil(t, err)
683-
assert.Eventually(t, func() bool { return checkTrustMessageRequest(jsonRPCRecorder) }, time.Second, time.Millisecond)
683+
assert.Eventually(t, func() bool { return checkTrustMessageRequest(jsonRPCRecorder) }, time.Second*5, time.Millisecond)
684684
}
685685

686686
func Test_initialize_doesnotHandleUntrustedFolders(t *testing.T) {

0 commit comments

Comments
 (0)