cmd

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2026 License: MIT Imports: 5 Imported by: 0

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 IsVerbose

func IsVerbose() bool

IsVerbose returns whether verbose mode is enabled

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL