cuda-doctor logo

Repo manifest scanner and patcher

Implementedv0.0.0

src/core/repo.cpp

This is the most automation-heavy file in the repo today. It walks the current project tree, finds supported manifest files, flags known compatibility issues like `-m32`, `Win32`, and `CUDA_32_BIT_DEVICE_CODE ON`, and can rewrite them into safer 64-bit defaults.

Reference

  • Defines the patch rules that convert known 32-bit build settings into x64-safe settings.
  • Skips internal and vendor directories such as `.git`, `.dist`, `build`, `node_modules`, and `third_party`.
  • Scans `CMakeLists.txt`, `package.json`, `Makefile`, `.cmake`, and `.mk` files.

Behavior

Scanning

Reads manifest files line-by-line and records file, line, description, and snippet whenever a known bad pattern appears.

Patching

Runs string replacements for every rule, writes changed files back to disk, and rescans the repo to confirm whether issues remain.

Reporting

Produces `ok` when manifests are clean, `issue` when bad settings remain, and richer messages that describe how many problems or files were changed.

Caveats

The current patching strategy is text replacement, which makes it simple and effective for known patterns but also intentionally narrow. It is not a full semantic build-system editor.