Documentation
¶
Overview ¶
Package cmd implements the command-line interface for the code review assistant.
The cmd package provides Cobra-based CLI commands for analyzing Go projects. It handles command-line flag parsing, configuration loading, and orchestrates the analysis pipeline.
Commands ¶
- analyze: Run code analysis on a Go project
Usage ¶
Run analysis on current directory:
code-review-assistant analyze
Run analysis on specific directory:
code-review-assistant analyze /path/to/project
Override configuration via flags:
code-review-assistant analyze --complexity-threshold 15 --verbose
Use custom configuration file:
code-review-assistant analyze --config custom-config.yaml
Configuration Priority ¶
Settings are applied in the following order (highest to lowest): 1. CLI flags 2. Environment variables 3. Configuration file 4. Default values
This allows flexible configuration while maintaining sensible defaults.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Execute ¶
func Execute() error
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func GetConfigFile ¶
func GetConfigFile() string
GetConfigFile returns the configured config file path
func SetConfigFile ¶ added in v0.2.1
func SetConfigFile(path string)
SetConfigFile sets the config file path (primarily for testing)
Types ¶
This section is empty.