Search documentation of Ragex

# mix ragex.analyze (Ragex v0.4.0)

View Source

Performs comprehensive analysis on a directory.

Analyzes a directory using all available Ragex analysis features:

- Security vulnerability scanning
- Business logic analysis (20 analyzers)
- Code complexity metrics
- Code smell detection
- Code duplication detection
- Dead code analysis
- Dependency analysis
- Quality metrics

## Usage

    mix ragex.analyze [options]

## Options

- `--path PATH` - Directory to analyze (default: current directory)
- `--output FILE` - Output file for results (default: stdout)
- `--format FORMAT` - Output format: text, json, markdown (default: text)
- `--security` - Include security analysis
- `--business-logic` - Include business logic analysis (20 analyzers)
- `--complexity` - Include complexity analysis
- `--smells` - Include code smell detection
- `--duplicates` - Include duplication detection
- `--dead-code` - Include dead code analysis
- `--dependencies` - Include dependency analysis
- `--quality` - Include quality metrics
- `--all` - Include all analyses (default)
- `--severity LEVEL` - Minimum severity for issues: low, medium, high, critical (default: medium)
- `--threshold FLOAT` - Duplication threshold 0.0-1.0 (default: 0.85)
- `--min-complexity INT` - Minimum complexity to report (default: 10)
- `--verbose` - Show detailed progress information
- `--with-empty` / `--without-empty` - Include/exclude empty issue reports in output (default: without-empty)

## Examples

    # Analyze current directory with all features
    mix ragex.analyze

    # Analyze specific directory
    mix ragex.analyze --path lib/

    # Security and quality analysis only
    mix ragex.analyze --security --quality

    # Output to file in JSON format
    mix ragex.analyze --output report.json --format json

    # High severity issues only
    mix ragex.analyze --severity high

    # Analyze with custom thresholds
    mix ragex.analyze --threshold 0.9 --min-complexity 15