Delete dead code and stale fixtures before tagging #70
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Four pieces of confirmed-dead code and one stale fixture. All verified by
grep against
main; none has a production consumer.Items
internal/models/— the entire package.grep -rl 'internal/models' --include=*.go .matches onlyinternal/models/models_test.go. Seven types, ~65 lines, zeroproduction consumers, plus a 58-line test that exists solely to give a
dead package coverage. Delete both, or state concretely why the
package must stay.
internal/cli/vaultik_snapshot_types.go. Definescli.SnapshotInfo(3 fields).grep -rn 'cli\.SnapshotInfo'returnsnothing — every real use resolves to the other
SnapshotInfoininternal/vaultik/helpers.go:61(6 fields). Two same-named types whereonly one is live is an active trap for the next person. Delete the file.
test-config.yml(repo root). Usessource_dirs,min_chunk_size,max_chunk_size,blob_size— none of which existon
config.Config(internal/config/config.go:130-151). It would failValidate()today and is referenced by no Go file. Delete it.(
test/config.yamlandtest/integration-config.ymlare current —leave those alone.)
config setsilently reindents the file it promises to preserve.README:159-163 claims "Comments and formatting in the file are
preserved".
internal/cli/config.go:384calls bareyaml.Marshal,whose default indent is 4 spaces, while
defaultConfigTemplate(
config.go:36-225) is written with 2. Comments do survive, but thefirst
config setreindents the whole file. Fix withyaml.NewEncoder+SetIndent(2).Deliberately excluded:
remoteOnlyCelland theLocallyTracked == falsebranch (internal/vaultik/snapshot.go:663-671)are currently unreachable, but they are the correct target state and #64
makes them live. Do not delete them.
Definition of done
config setround-trippreserves both comments and 2-space indentation. This is the only
behavior change in this issue.
grep -rn 'internal/models\|cli\.SnapshotInfo\|test-config\.yml'returns nothing outside of history.
independently.
it, and say so on this issue rather than forcing the deletion.
make checkgreen.