pub struct CodeReviewAgent {
pub standards: CodeReviewStandards,
}Expand description
Code Review Agent - Provides automated code review
Fields§
§standards: CodeReviewStandardsCode review standards
Implementations§
Source§impl CodeReviewAgent
impl CodeReviewAgent
Sourcepub fn with_standards(standards: CodeReviewStandards) -> Self
pub fn with_standards(standards: CodeReviewStandards) -> Self
Create with custom standards
Sourcepub fn analyze_code(&self, pr: &PullRequest) -> Result<Vec<CodeQualityIssue>>
pub fn analyze_code(&self, pr: &PullRequest) -> Result<Vec<CodeQualityIssue>>
Analyze PR code for quality issues
Sourcepub fn generate_suggestions(
&self,
issues: &[CodeQualityIssue],
) -> Result<Vec<CodeReviewSuggestion>>
pub fn generate_suggestions( &self, issues: &[CodeQualityIssue], ) -> Result<Vec<CodeReviewSuggestion>>
Generate code review suggestions
Sourcepub fn validate_standards(
&self,
pr: &PullRequest,
) -> Result<Vec<CodeQualityIssue>>
pub fn validate_standards( &self, pr: &PullRequest, ) -> Result<Vec<CodeQualityIssue>>
Validate code against project standards
Sourcepub fn is_valid_branch_name(&self, branch: &str) -> bool
pub fn is_valid_branch_name(&self, branch: &str) -> bool
Check if branch name is valid
Sourcepub fn generate_summary(&self, result: &CodeReviewResult) -> Result<String>
pub fn generate_summary(&self, result: &CodeReviewResult) -> Result<String>
Generate code review summary
Sourcepub fn should_approve(&self, result: &CodeReviewResult) -> Result<bool>
pub fn should_approve(&self, result: &CodeReviewResult) -> Result<bool>
Determine if PR should be approved
Sourcepub fn review_pr(&self, pr: &PullRequest) -> Result<CodeReviewResult>
pub fn review_pr(&self, pr: &PullRequest) -> Result<CodeReviewResult>
Perform complete code review
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CodeReviewAgent
impl RefUnwindSafe for CodeReviewAgent
impl Send for CodeReviewAgent
impl Sync for CodeReviewAgent
impl Unpin for CodeReviewAgent
impl UnwindSafe for CodeReviewAgent
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more