pub struct CodeReviewAgent { /* private fields */ }Expand description
Code Review Agent for analyzing code quality, security, and best practices
The CodeReviewAgent performs comprehensive code analysis including:
- Code quality issues (naming, structure, complexity)
- Security vulnerabilities
- Performance optimization opportunities
- Best practice violations
§Configuration
The agent supports the following configuration options:
enable_quality_checks: Enable code quality analysis (default: true)enable_security_checks: Enable security scanning (default: true)enable_performance_checks: Enable performance analysis (default: true)enable_best_practice_checks: Enable best practice checking (default: true)max_complexity: Maximum allowed cyclomatic complexity (default: 10)max_function_length: Maximum allowed function length in lines (default: 50)
Implementations§
Source§impl CodeReviewAgent
impl CodeReviewAgent
Sourcepub fn with_config(config: AgentConfig) -> Self
pub fn with_config(config: AgentConfig) -> Self
Create a new CodeReviewAgent with custom configuration
Trait Implementations§
Source§impl Agent for CodeReviewAgent
impl Agent for CodeReviewAgent
Source§fn description(&self) -> &str
fn description(&self) -> &str
Get the agent’s description Read more
Source§fn supports(&self, task_type: TaskType) -> bool
fn supports(&self, task_type: TaskType) -> bool
Check if the agent supports a specific task type Read more
Source§fn execute<'life0, 'async_trait>(
&'life0 self,
_input: AgentInput,
) -> Pin<Box<dyn Future<Output = Result<AgentOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
_input: AgentInput,
) -> Pin<Box<dyn Future<Output = Result<AgentOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute the agent with the given input Read more
Source§fn config_schema(&self) -> ConfigSchema
fn config_schema(&self) -> ConfigSchema
Get the agent’s configuration schema Read more
Source§fn metrics(&self) -> AgentMetrics
fn metrics(&self) -> AgentMetrics
Get the agent’s performance metrics Read more
Source§impl Clone for CodeReviewAgent
impl Clone for CodeReviewAgent
Source§fn clone(&self) -> CodeReviewAgent
fn clone(&self) -> CodeReviewAgent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CodeReviewAgent
impl Debug for CodeReviewAgent
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