mirror of
https://github.com/mulgadc/spinifex.git
synced 2026-10-15 17:11:30 +00:00
refactor: split daemon_handlers.go into per-domain files
Split the monolithic daemon_handlers.go into focused files: - daemon_handlers_account.go - daemon_handlers_console.go - daemon_handlers_igw.go - daemon_handlers_image.go - daemon_handlers_instance.go - daemon_handlers_key.go - daemon_handlers_snapshot.go - daemon_handlers_tag.go - daemon_handlers_volume.go - daemon_handlers_vpc.go Add tests for ModifyVolume success, TerminateStoppedInstance with volumes, DescribeInstanceTypes capacity filter, StartStoppedInstance type-not-available, AttachVolume/DetachVolume validation paths, RunInstances error paths, and DescribeInstances malformed ID. Fix diff-coverage.sh to use git rename/copy detection (-M -C) so file splits are not incorrectly flagged as all-new code.
This commit is contained in:
@@ -64,8 +64,10 @@ TMPDIR=$(mktemp -d)
|
||||
trap 'rm -rf "$TMPDIR"' EXIT
|
||||
|
||||
# --- Step 1: Extract added line numbers from diff ---
|
||||
# Only non-test .go files that were added or modified
|
||||
git diff "${BASE_REF}" HEAD --unified=0 --diff-filter=AM -- '*.go' ':!*_test.go' | awk '
|
||||
# Only non-test .go files that were added or modified.
|
||||
# -M enables rename detection so file splits/moves only count truly changed lines.
|
||||
# -C enables copy detection for the same reason (file split = partial copy).
|
||||
git diff "${BASE_REF}" HEAD --unified=0 -M -C --diff-filter=AM -- '*.go' ':!*_test.go' | awk '
|
||||
/^\+\+\+ / {
|
||||
file = substr($2, 3)
|
||||
next
|
||||
|
||||
Reference in New Issue
Block a user