SOLID refactoring: Abstract prerequisite checks into IPrerequisiteVerifier to bypass physical OS checks and fix Gitea CI/CD test run
Build and Test / build (push) Successful in 1m14s
Build and Test / build (push) Successful in 1m14s
This commit is contained in:
+1
-1
@@ -14,7 +14,7 @@ All future modifications to the `NixWslWrapper` solution must adhere to the foll
|
||||
* **SOLID Principles**:
|
||||
* *Single Responsibility (SRP)*: Keep execution strategies, builders, stream copiers, and CLI formatting separated.
|
||||
* *Open/Closed (OCP)*: If we need execution methods other than WSL (e.g. SSH, Local), implement a new strategy implementing `ICommandExecutor` rather than modifying `WslCommandExecutor`.
|
||||
* *Dependency Inversion (DIP)*: Inject interfaces (`ICommandExecutor`, `IStreamCopier`) and stream abstractions (`Stream`) to facilitate seamless unit testing and mock assertions.
|
||||
* *Dependency Inversion (DIP)*: Inject interfaces (`ICommandExecutor`, `IStreamCopier`, `IPrerequisiteVerifier`) and stream abstractions (`Stream`) to facilitate seamless unit testing and mock assertions without hitting physical OS or environmental components.
|
||||
* **Visual UI/UX Check**:
|
||||
* For CLI diagnostics, use `Spectre.Console` markup (`[color]...[/]`) to color-code output. Always escape literal brackets by doubling them (`[[literal-text]]`) to prevent parser errors.
|
||||
* Render a rich dashboard with `FigletText` and `Table` grids when administrative diagnostics are run (e.g. `--wsl-status`).
|
||||
|
||||
Reference in New Issue
Block a user