In the current implementation, only region.startLine is populated. I would like to see also endColumn, endLine, and startColumn.
Example
shellcheck --format=json1 src/index.sh | csgrep --mode=sarif
ShellCheck output:
{
"comments": [
{
"file": "src/index.sh",
"line": 4,
"endLine": 4,
"column": 27,
"endColumn": 43,
"level": "info",
"code": 2312,
"message": "Consider invoking this command separately to avoid masking its return value (or use '|| true' to ignore).",
"fix": null
},
],
}
csgrep output:
{
"$schema": "https://json.schemastore.org/sarif-2.1.0.json",
"version": "2.1.0",
"runs": [
{
"results": [
{
"ruleId": "SHELLCHECK_WARNING: info[SC2312]",
"locations": [
{
"id": 0,
"physicalLocation": {
"artifactLocation": {
"uri": "src/index.sh"
},
"region": {
"startLine": 4
}
}
}
],
"message": {
"text": "Consider invoking this command separately to avoid masking its return value (or use '|| true' to ignore)."
},
},
]
}
]
}
I would like to see:
{
"startLine": 4
"startColumn": 27,
"endLine": 4,
"endColumn": 43,
}
It could greatly improve user experience on platforms like GitHub that can display SARIF data in UI.
In the current implementation, only
region.startLineis populated. I would like to see alsoendColumn,endLine, andstartColumn.Example
shellcheck --format=json1 src/index.sh | csgrep --mode=sarifShellCheck output:
{ "comments": [ { "file": "src/index.sh", "line": 4, "endLine": 4, "column": 27, "endColumn": 43, "level": "info", "code": 2312, "message": "Consider invoking this command separately to avoid masking its return value (or use '|| true' to ignore).", "fix": null }, ], }csgrep output:
{ "$schema": "https://json.schemastore.org/sarif-2.1.0.json", "version": "2.1.0", "runs": [ { "results": [ { "ruleId": "SHELLCHECK_WARNING: info[SC2312]", "locations": [ { "id": 0, "physicalLocation": { "artifactLocation": { "uri": "src/index.sh" }, "region": { "startLine": 4 } } } ], "message": { "text": "Consider invoking this command separately to avoid masking its return value (or use '|| true' to ignore)." }, }, ] } ] }I would like to see:
{ "startLine": 4 "startColumn": 27, "endLine": 4, "endColumn": 43, }It could greatly improve user experience on platforms like GitHub that can display SARIF data in UI.