clang: warning: diagnostic formatting in SARIF mode is currently unstable [-Wsarif-format-unstable] { "$schema": "https://docs.oasis-open.org/sarif/sarif/v2.1.0/cos02/schemas/sarif-schema-2.1.0.json", "runs": [ { "artifacts": [ { "length": -1, "location": { "index": 0, "uri": "file:///[...]/sarif-diagnostics.cpp" }, "mimeType": "text/plain", "roles": [ "resultFile" ] } ], "columnKind": "unicodeCodePoints", "results": [ { "level": "error", "locations": [ { "physicalLocation": { "artifactLocation": { "index": 0, "uri": "file:///[...]/sarif-diagnostics.cpp" }, "region": { "endColumn": 1, "startColumn": 1, "startLine": 12 } } } ], "message": { "text": "'main' must return 'int'" }, "ruleId": "err_main_returns_nonint", "ruleIndex": 0 }, { "level": "error", "locations": [ { "physicalLocation": { "artifactLocation": { "index": 0, "uri": "file:///[...]/sarif-diagnostics.cpp" }, "region": { "endColumn": 16, "endLine": 13, "startColumn": 11, "startLine": 13 } } }, { "physicalLocation": { "artifactLocation": { "index": 0, "uri": "file:///[...]/sarif-diagnostics.cpp" }, "region": { "endColumn": 11, "startColumn": 11, "startLine": 13 } } } ], "message": { "text": "use of undeclared identifier 'hello'" }, "ruleId": "err_undeclared_var_use", "ruleIndex": 1 }, { "level": "error", "locations": [ { "physicalLocation": { "artifactLocation": { "index": 0, "uri": "file:///[...]/sarif-diagnostics.cpp" }, "region": { "endColumn": 17, "startColumn": 17, "startLine": 15 } } } ], "message": { "text": "invalid digit 'a' in decimal constant" }, "ruleId": "err_invalid_digit", "ruleIndex": 2 }, { "level": "warning", "locations": [ { "physicalLocation": { "artifactLocation": { "index": 0, "uri": "file:///[...]/sarif-diagnostics.cpp" }, "region": { "endColumn": 5, "startColumn": 5, "startLine": 19 } } } ], "message": { "text": "misleading indentation; statement is not part of the previous 'if'" }, "ruleId": "warn_misleading_indentation", "ruleIndex": 3 }, { "level": "note", "locations": [ { "physicalLocation": { "artifactLocation": { "index": 0, "uri": "file:///[...]/sarif-diagnostics.cpp" }, "region": { "endColumn": 3, "startColumn": 3, "startLine": 17 } } } ], "message": { "text": "previous statement is here" }, "ruleId": "note_previous_statement", "ruleIndex": 4 }, { "level": "warning", "locations": [ { "physicalLocation": { "artifactLocation": { "index": 0, "uri": "file:///[...]/sarif-diagnostics.cpp" }, "region": { "endColumn": 13, "endLine": 18, "startColumn": 10, "startLine": 18 } } }, { "physicalLocation": { "artifactLocation": { "index": 0, "uri": "file:///[...]/sarif-diagnostics.cpp" }, "region": { "endColumn": 10, "startColumn": 10, "startLine": 18 } } } ], "message": { "text": "unused variable 'Yes'" }, "ruleId": "warn_unused_variable", "ruleIndex": 5 }, { "level": "error", "locations": [ { "physicalLocation": { "artifactLocation": { "index": 0, "uri": "file:///[...]/sarif-diagnostics.cpp" }, "region": { "endColumn": 14, "endLine": 21, "startColumn": 12, "startLine": 21 } } }, { "physicalLocation": { "artifactLocation": { "index": 0, "uri": "file:///[...]/sarif-diagnostics.cpp" }, "region": { "endColumn": 12, "startColumn": 12, "startLine": 21 } } } ], "message": { "text": "use of undeclared identifier 'hi'" }, "ruleId": "err_undeclared_var_use", "ruleIndex": 6 }, { "level": "error", "locations": [ { "physicalLocation": { "artifactLocation": { "index": 0, "uri": "file:///[...]/sarif-diagnostics.cpp" }, "region": { "endColumn": 1, "startColumn": 1, "startLine": 23 } } } ], "message": { "text": "extraneous closing brace ('}')" }, "ruleId": "err_extraneous_closing_brace", "ruleIndex": 7 }, { "level": "error", "locations": [ { "physicalLocation": { "artifactLocation": { "index": 0, "uri": "file:///[...]/sarif-diagnostics.cpp" }, "region": { "endColumn": 6, "endLine": 27, "startColumn": 5, "startLine": 27 } } }, { "physicalLocation": { "artifactLocation": { "index": 0, "uri": "file:///[...]/sarif-diagnostics.cpp" }, "region": { "endColumn": 10, "endLine": 27, "startColumn": 9, "startLine": 27 } } }, { "physicalLocation": { "artifactLocation": { "index": 0, "uri": "file:///[...]/sarif-diagnostics.cpp" }, "region": { "endColumn": 7, "startColumn": 7, "startLine": 27 } } } ], "message": { "text": "invalid operands to binary expression ('t1' and 't1')" }, "ruleId": "err_typecheck_invalid_operands", "ruleIndex": 8 } ], "tool": { "driver": { "fullName": "", "informationUri": "https://clang.llvm.org/docs/UsersManual.html", "language": "en-US", "name": "clang", "rules": [ { "defaultConfiguration": { "enabled": true, "level": "error", "rank": 50 }, "fullDescription": { "text": "" }, "id": "err_main_returns_nonint", "name": "" }, { "defaultConfiguration": { "enabled": true, "level": "error", "rank": 50 }, "fullDescription": { "text": "" }, "id": "err_undeclared_var_use", "name": "" }, { "defaultConfiguration": { "enabled": true, "level": "error", "rank": 50 }, "fullDescription": { "text": "" }, "id": "err_invalid_digit", "name": "" }, { "defaultConfiguration": { "enabled": true, "level": "warning", "rank": -1 }, "fullDescription": { "text": "" }, "id": "warn_misleading_indentation", "name": "" }, { "defaultConfiguration": { "enabled": true, "level": "note", "rank": -1 }, "fullDescription": { "text": "" }, "id": "note_previous_statement", "name": "" }, { "defaultConfiguration": { "enabled": true, "level": "warning", "rank": -1 }, "fullDescription": { "text": "" }, "id": "warn_unused_variable", "name": "" }, { "defaultConfiguration": { "enabled": true, "level": "error", "rank": 50 }, "fullDescription": { "text": "" }, "id": "err_undeclared_var_use", "name": "" }, { "defaultConfiguration": { "enabled": true, "level": "error", "rank": 50 }, "fullDescription": { "text": "" }, "id": "err_extraneous_closing_brace", "name": "" }, { "defaultConfiguration": { "enabled": true, "level": "error", "rank": 50 }, "fullDescription": { "text": "" }, "id": "err_typecheck_invalid_operands", "name": "" } ], "version": "[clang version]" } } } ], "version": "[SARIF version]" } 2 warnings and 6 errors generated.