-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better support of SARIF format #49
Comments
Here's a specific example (from #48). Since imports are not supported by
yields the following output in SARIF format: {
"results": [
{
"ruleId": "AnFaR",
"message": "\\perp at {x=NONE}"
},
{
"ruleId": "AnOdin",
"message": "Odin is not able to analyze the code, due to:\nCould not set locator for non-existent object with name \"main\""
}
]
} However, expected output should look more like the following: {
"version": "2.1.0",
"runs": [
{
"tool": {
"driver": {
"name": "Polystat",
"informationUri": "https://polystat.org",
"rules": [
{
"id": "AnFaR",
"shortDescription": {
"text": "division by zero"
},
"helpUri": "https://eslint.org/docs/rules/no-unused-vars",
"properties": {
"category": "Variables"
}
},
{
"id": "odin-unanticipated-recursion",
"shortDescription": {
"text": "unanticipated recursion in subclasses (decorated objects)"
},
"helpUri": "https://github.com/polystat/odin/blob/master/docs/analysis/mutual_recursion_analyzer.md",
"properties": {
"category": "Fragile base class"
}
},
{
"id": "odin-unjustified-assumptions",
"shortDescription": {
"text": "unjustified assumptions in subclasses (decorated objects) w.r.t. method dependencies in base class"
},
"properties": {
"category": "Fragile base class"
}
}
],
"notifications": [
{
"id": "NOTIFY_RULE_EXCEPTION",
"name": "rule-threw-exception",
"defaultConfiguration": {
"level": "error"
},
"shortDescription": {
"text": "This notification is triggered when an analysis rule throws an exception."
},
"fullDescription": {
"text": "This notification is triggered when an analysis rule throws an exception while analyzing a file. Depending on the command line options, the rule might either be disabled, or it might continue to run on subsequent files."
},
"messageStrings": {
"disable": {
"text": "'{0}' threw a '{1}' exception while analyzing file '{2}'. The rule has been disabled."
},
"continue": {
"text": "'{0}' threw a '{1}' exception while analyzing file '{2}'. The rule will continue to be run on subsequent files."
}
}
}
]
}
},
"results": [
{
"ruleId": "AnFaR",
"message": {
"text": "Division by zero possible when x = 2"
},
"locations": [
{
"physicalLocation": {
"artifactLocation": {
"uri": "test.eo"
},
"region": {
"startLine": 5
}
}
}
]
}
],
"invocations": [
{
"executionSuccessful": true
},
{
"executionSuccessful": false,
"toolExecutionNotifications": [
{
"descriptor": {
"id": "NOTIFY_RULE_EXCEPTION",
"index": 1
},
"message": {
"id": "continue",
"arguments": [
"odin-unanticipated-recursion",
"UnsupportedFeatureException",
"test.eo"
]
},
"exception": {
"kind": "org.polystat.odin.interop.java.UnsupportedFeatureException",
"message": "Unable to set locator for non-existent object with name \"main\""
}
}
]
}
]
}
]
} |
This was referenced Mar 22, 2022
Closed
@fizruk try version 0.6.0, just released |
@fizruk let's close this? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please, see this Simple Example in the SARIF tutorials to understand the kind of information current output is lacking:
error
,warning
, etc.)Also, importantly, in relation to #44, any failures in individual analyzer modules should be reported using Notifications.
The text was updated successfully, but these errors were encountered: