6981f55f28
canon sync rewrites the managed block of CMakeLists.txt from .canon.toml, for after either was edited by hand. It prints a unified diff of the change (also with --dry-run), writes only CMakeLists.txt so comments in .canon.toml survive, does nothing if the block already matches, and warns when the build will still fail because .canon.toml declares files that do not exist. doctor's hand-edited-block warning now points to it. - diff: a small line-based unified diff, no external tools - tests: a sync scenario (hand-edited manifest, --dry-run leaves the file untouched, sync from a subdirectory, no-op second run, hand edits in the block replaced); unit tests for plan_sync and unified_diff Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
12 lines
210 B
C++
12 lines
210 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <string_view>
|
|
|
|
namespace hello {
|
|
|
|
// Returns a greeting for name, e.g. "Hello, World!".
|
|
[[nodiscard]] std::string greeting(std::string_view name);
|
|
|
|
} // namespace hello
|