Skip to content

Commit 0923c6a

Browse files
committed
add: rationale to diagnostic comments in PR reviews
1 parent 31b7add commit 0923c6a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cpp-linter/src/clang_tools/clang_tidy.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,11 @@ impl MakeSuggestions for TidyAdvice {
106106
for note in &self.notes {
107107
for fixed_line in &note.fixed_lines {
108108
if (start_line..=end_line).contains(fixed_line) {
109-
diagnostics.push(format!("- {}\n", note.diagnostic_link()));
109+
diagnostics.push(format!(
110+
"- {} [{}]\n",
111+
note.rationale,
112+
note.diagnostic_link()
113+
));
110114
}
111115
}
112116
}

0 commit comments

Comments
 (0)