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
Unknown keysWarns about keys HORUS does not understand (e.g. language, nodes, topics); language is auto-detected from source files, not declared
Required fieldsEnsures all mandatory fields are present

Dependencies are not inspected in this phase — see Manifest-file checks below.

horus check

> Scanning workspace: /home/me/my_robot

  Found 1 horus.toml file(s)
  Found 0 Rust file(s)
  Found 2 Python file(s)

------------------------------------------------------------
> Phase 1: Validating horus.toml manifests...

  > horus.toml
      * manifest valid

Phase 2: Rust Deep Check

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

------------------------------------------------------------
> Phase 2: Deep Rust check (cargo check)...

  > . ... *

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 (syntax + imports)...

  > main.py *
  > nodes/sensor.py *

Manifest-file checks (horus check horus.toml)

Pointing check at a manifest file instead of a directory runs a different, single-manifest pass. These checks do not run for horus check on a directory:

  • Dependency sources: Warns when a dependency defaults to the registry but looks like a crates.io/PyPI package
  • Toolchain: Verifies the toolchain for each detected language is on PATH (rustc, python3, cmake, ros2)
  • System requirements: Checks that the shared-memory directory is available and can be created
  • Disk space: Warns below 500MB free, errors below 100MB
  • API usage: For Rust projects that depend on HORUS, warns when no Scheduler usage is found in the entry point
  • Registry connectivity: Pings registry.horus.rs on every run

Example Output

$ horus check

> Scanning workspace: /home/me/my_robot

  Found 1 horus.toml file(s)
  Found 0 Rust file(s)
  Found 2 Python file(s)

------------------------------------------------------------
> Phase 1: Validating horus.toml manifests...

  > horus.toml
      * manifest valid

------------------------------------------------------------
> Phase 3: Python validation (syntax + imports)...

  > main.py *
  > nodes/sensor.py *

------------------------------------------------------------
> Workspace Check Summary

  Files checked: 3
  Status: * All checks passed!

Phases with no matching files are skipped entirely. This Python-only project prints Phase 1 and Phase 3 and no Phase 2.

When to Use

Run horus check:

  • Before deploying to a robot
  • Before publishing a package to the registry
  • After modifying horus.toml
  • After adding new dependencies

See Also