pub struct ReviewComments {
pub tool_total: u32,
pub comments: Vec<Suggestion>,
pub full_patch: String,
}Expand description
A struct to describe the Pull Request review suggestions.
Fields§
§tool_total: u32The total count of suggestions from clang-tidy and clang-format.
This differs from comments.len() because some suggestions may
not fit within the file’s diff.
comments: Vec<Suggestion>A list of comment suggestions to be posted.
These suggestions are guaranteed to fit in the file’s diff.
full_patch: StringThe complete patch of changes to all files scanned.
This includes changes from both clang-tidy and clang-format (assembled in that order).
Implementations§
Source§impl ReviewComments
impl ReviewComments
Sourcepub fn summarize(
&self,
clang_versions: &ClangVersions,
comments: &[ReviewComment],
total_review_comments: u32,
summary_only: bool,
) -> String
pub fn summarize( &self, clang_versions: &ClangVersions, comments: &[ReviewComment], total_review_comments: u32, summary_only: bool, ) -> String
Get a markdown-formatted string that summarizes the given ReviewComments.
The total_review_comments parameter describes the number of comments before removing duplicates found in previous reviews.
Sourcepub fn is_comment_in_suggestions(&mut self, comment: &Suggestion) -> bool
pub fn is_comment_in_suggestions(&mut self, comment: &Suggestion) -> bool
Check if a given comment’s Suggestion is already contained within the existing Self::comments.
Trait Implementations§
Source§impl Default for ReviewComments
impl Default for ReviewComments
Source§fn default() -> ReviewComments
fn default() -> ReviewComments
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ReviewComments
impl RefUnwindSafe for ReviewComments
impl Send for ReviewComments
impl Sync for ReviewComments
impl Unpin for ReviewComments
impl UnsafeUnpin for ReviewComments
impl UnwindSafe for ReviewComments
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more