checkRustFormatting

Check Rust workspace formatting when the Rust tools are available.

Rust remains optional for developers who are not working on Rust modules. Continuous integration installs the formatter explicitly and therefore always enforces this check.

checkRustFormatting.is_continuous_integration() bool[source]

Return True when the hook is running in continuous integration.

checkRustFormatting.main() int[source]

Run cargo fmt --check or skip it when Rust is unavailable locally.

checkRustFormatting.unavailable_tool_result(tool_name: str) int[source]

Report an unavailable Rust tool and return the appropriate status.