@@ -31,6 +31,7 @@ BUILD_DIR="build-release"
3131FILE_REGEX=' ^(?!.*/(_deps|build-[^/]*|bridge|examples|client-sdk-rust|cpp-example-collection|vcpkg_installed|docker|docs|data)/).*/src/(?!tests/).*\.(c|cpp|cc|cxx)$'
3232
3333CI_MODE=0
34+ # Automatically detect CI mode if in GitHub actions environment
3435if [[ " ${GITHUB_ACTIONS:- } " == " true" ]]; then
3536 CI_MODE=1
3637fi
@@ -129,6 +130,12 @@ emit_annotations() {
129130 severity=" ${BASH_REMATCH[4]} "
130131 message=" ${BASH_REMATCH[5]} "
131132 check=" ${BASH_REMATCH[6]} "
133+ # clang-tidy appends ",-warnings-as-errors" to the bracket suffix when a
134+ # diagnostic is promoted from warning to error via WarningsAsErrors. Strip
135+ # it so the title, docs link, and Top-checks bucket are identical for the
136+ # warning and error code paths -- severity is already conveyed by the
137+ # ::warning / ::error workflow command prefix below.
138+ check=" ${check% ,-warnings-as-errors} "
132139
133140 rel_path=" ${path# ${workspace} / } "
134141
@@ -167,6 +174,10 @@ write_step_summary() {
167174 sseverity=" ${BASH_REMATCH[4]} "
168175 smessage=" ${BASH_REMATCH[5]} "
169176 scheck=" ${BASH_REMATCH[6]} "
177+ # Strip the ",-warnings-as-errors" promotion marker so error rows bucket
178+ # under the same check name as their warning counterparts (see
179+ # emit_annotations for the rationale).
180+ scheck=" ${scheck% ,-warnings-as-errors} "
170181 printf ' %s\t%s\t%s\t%s\t%s\t%s\n' \
171182 " ${sseverity} " " ${spath} " " ${slineno} " " ${scol} " " ${scheck} " " ${smessage} " \
172183 >> " ${findings_tsv} "
0 commit comments