Static Analysis

horus check validates your HORUS project configuration, Rust code, and Python scripts before running.

Quick Start

# Run all checks on your project
horus check

# Check a specific project directory
horus check ./my_robot

What It Checks

Phase 1: Manifest Validation

Validates your horus.toml project manifest:

CheckDescription
Project nameMust be present, lowercase alphanumeric + hyphens/underscores
VersionMust be valid semver
Build fileDetects Cargo.toml (Rust) or pyproject.toml (Python)
Required fieldsEnsures all mandatory fields are present
horus check

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  Phase 1: Manifest Validation
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  ✓ Project name valid
  ✓ Version is valid semver
  ✓ Build file detected (Cargo.toml)
  ✓ Configuration valid

Phase 2: Rust Deep Check

For Rust projects, runs cargo check to verify code compiles:

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  Phase 2: Rust Deep Check
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  Running cargo check...
  ✓ Rust code compiles successfully

This catches type errors, borrow checker issues, and missing imports before runtime.

Phase 3: Python Validation

For Python projects, checks syntax and imports:

CheckDescription
SyntaxRuns py_compile on all .py files
ImportsVerifies that imported modules are available
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  Phase 3: Python Validation
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  Checking Python files...
  ✓ main.py - syntax OK
  ✓ nodes/sensor.py - syntax OK
  ✓ All imports resolvable

Additional Checks

horus check also validates:

  • Toolchain: Verifies Rust toolchain and Python interpreter are available
  • System requirements: Checks disk space and system dependencies
  • API usage: Validates HORUS API usage patterns in project code
  • Registry connectivity: Tests connection to the HORUS package registry (if packages are declared)

Example Output

$ horus check

╔══════════════════════════════════════════╗
║         HORUS Project Check             ║
╚══════════════════════════════════════════╝

Project: my_robot (v0.1.0)
Language: python

Phase 1: Manifest ...................... ✓
Phase 2: Python Validation ............ ✓
Phase 3: System Requirements .......... ✓

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  Result: All checks passed ✓
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

When to Use

Run horus check before:

  • Deploying to a robot
  • Publishing a package to the registry
  • After modifying horus.toml
  • After adding new dependencies

See Also