| 40 | |
| 41 | |
| 42 | def ensure_tools(run_inspect: bool, run_similarity: bool) -> bool: |
| 43 | missing: list[str] = [] |
| 44 | if not check_tool("dotnet"): |
| 45 | missing.append("dotnet") |
| 46 | if run_inspect and not check_tool("jb"): |
| 47 | missing.append("jb (dotnet tool install -g JetBrains.ReSharper.GlobalTools)") |
| 48 | if run_similarity and not check_tool("similarity-csharp"): |
| 49 | missing.append("similarity-csharp (dotnet tool install -g SimilarityCSharp.Cli)") |
| 50 | |
| 51 | if missing: |
| 52 | print("Missing required tools:") |
| 53 | for m in missing: |
| 54 | print(f" - {m}") |
| 55 | return False |
| 56 | return True |
| 57 | |
| 58 | |
| 59 | # ── .sln generation ───────────────────────────────────────────────────── |