Refactor code structure for improved readability and maintainability
mandatory-regression-gate / deterministic-tests (push) Has been cancelled
mandatory-regression-gate / protected-performance-path (push) Has been cancelled

This commit is contained in:
Your Name
2026-07-23 15:34:05 +03:00
parent 593522e83f
commit 8447b2d796
21 changed files with 3439 additions and 4 deletions
+35
View File
@@ -0,0 +1,35 @@
@echo off
REM Pre-commit test gate for Windows
REM Inspects staged .rs files and runs affected crate tests
setlocal enabledelayedexpansion
REM Get staged .rs files
set STAGED_FILES=
for /f "delims=" %%f in ('git diff --cached --name-only --diff-filter=ACMR -- "*.rs"') do (
if exist "%%f" set STAGED_FILES=!STAGED_FILES! %%f
)
if "%STAGED_FILES%"=="" (
echo No staged Rust files; commit regression tests are not required.
exit /b 0
)
echo Checking formatting...
for %%f in (%STAGED_FILES%) do (
rustfmt --edition 2021 --check "%%f"
if errorlevel 1 (
echo Formatting check failed for %%f
exit /b 1
)
)
echo Running deterministic workspace tests...
cargo check --locked --workspace --exclude hcie-io --examples
if errorlevel 1 exit /b %errorlevel%
cargo test --locked --workspace --exclude hcie-io --lib --tests -- --skip benchmark_4k_stroke_on_multilayer_document
if errorlevel 1 exit /b %errorlevel%
echo Mandatory Rust regression gate passed.
exit /b 0