mirror of
https://github.com/github/codeql.git
synced 2026-05-01 03:35:13 +02:00
Ruby: add some integration tests for diagnostic messages
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
4 %%% 5
|
||||
|
||||
if 1; 2
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"helpLinks": [
|
||||
"https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/customizing-code-scanning"
|
||||
],
|
||||
"location": {
|
||||
"endColumn": 5,
|
||||
"endLine": 1,
|
||||
"file": "<test-root-directory>/bad.rb",
|
||||
"startColumn": 4,
|
||||
"startLine": 1
|
||||
},
|
||||
"markdownMessage": "A parse error occurred. Check the syntax of the file. If the file is invalid, correct the error or [exclude](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/customizing-code-scanning) the file from analysis.",
|
||||
"plaintextMessage": "A parse error occurred. Check the syntax of the file. If the file is invalid, correct the error or exclude the file from analysis.",
|
||||
"severity": "Error",
|
||||
"source": {
|
||||
"extractorName": "ruby",
|
||||
"id": "ruby/parse-error",
|
||||
"name": "Parse error"
|
||||
},
|
||||
"visibility": {
|
||||
"statusPage": true
|
||||
}
|
||||
}
|
||||
{
|
||||
"helpLinks": [
|
||||
"https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/customizing-code-scanning"
|
||||
],
|
||||
"location": {
|
||||
"endColumn": 7,
|
||||
"endLine": 3,
|
||||
"file": "<test-root-directory>/bad.rb",
|
||||
"startColumn": 8,
|
||||
"startLine": 3
|
||||
},
|
||||
"markdownMessage": "A parse error occurred (expected `end` symbol). Check the syntax of the file. If the file is invalid, correct the error or [exclude](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/customizing-code-scanning) the file from analysis.",
|
||||
"plaintextMessage": "A parse error occurred (expected end symbol). Check the syntax of the file. If the file is invalid, correct the error or exclude the file from analysis.",
|
||||
"severity": "Error",
|
||||
"source": {
|
||||
"extractorName": "ruby",
|
||||
"id": "ruby/parse-error",
|
||||
"name": "Parse error"
|
||||
},
|
||||
"visibility": {
|
||||
"statusPage": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
import os
|
||||
from create_database_utils import *
|
||||
from diagnostics_test_utils import *
|
||||
|
||||
run_codeql_database_create([], lang="ruby", runFunction = runSuccessfully, db = None)
|
||||
|
||||
check_diagnostics()
|
||||
Reference in New Issue
Block a user