I ran colcon test --packages-select rclcpp and examined the clang_tidy output. Below is the XML reported by static analysis, as well as the SARIF generated by ament_clang_tidy on the spaceros branch.
XML output:
<testcase
name="/home/spaceros-user/src/spaceros/build/rclcpp/include/rclcpp/node_interfaces/get_node_base_interface.hpp:97:65"
classname="rclcpp.clang_tidy">
<failure message="non-const reference parameter 'node_interface', make it const or use a pointer [google-runtime-references]"><![CDATA[/home/spaceros-user/src/spaceros/build/rclcpp/include/rclcpp/node_interfaces/get_node_base_interface.hpp:97:65]]></failure>
</testcase>
The rules.shortDescription.text references code-specific issues, instead of the general issue being reported. This ends up duplicating rules when converting XML to SARIF.
results.message.text is not sufficient to describe the issue (related to 1 above).
startLine and startColumn should be integers, not strings.
results.message.text has extraneous characters that could throw off the SARIF dashboard. Not high priority, and may be difficult to intelligently strip from the result.
I ran
colcon test --packages-select rclcpp
and examined the clang_tidy output. Below is the XML reported by static analysis, as well as the SARIF generated by ament_clang_tidy on thespaceros
branch.XML output:
SARIF output:
What isn't right:
1
above).google-runtime-references
is deprecated, it was removed from Google's style guide in May 2020: https://www.mail-archive.com/cfe-commits@lists.llvm.org/msg203119.html