Skip to content

fix(migrate): reject scaffold names that produce a Go _test.go file#28

Merged
mlwelles merged 1 commit into
mainfrom
fix-scaffold-test-filename
May 30, 2026
Merged

fix(migrate): reject scaffold names that produce a Go _test.go file#28
mlwelles merged 1 commit into
mainfrom
fix-scaffold-test-filename

Conversation

@mlwelles
Copy link
Copy Markdown
Owner

A migration whose generated file would end in _test.go (e.g. naming it smoke_test<id>_smoke_test.go) is silently excluded from the package build by Go's test-file rule, so the All slice references an undefined var and the package won't compile. Scaffold now validates the filename before writing and returns an actionable error. Follow-up to #26/#27.

A migration named so its file ends in _test.go (e.g. "smoke_test" →
<id>_smoke_test.go) is silently excluded from the package build by Go's test-file
rule, leaving an undefined reference in the All slice. Scaffold now rejects such
names before writing anything, with a message telling the author to rename.
@mlwelles mlwelles merged commit 423f2ca into main May 30, 2026
@mlwelles mlwelles deleted the fix-scaffold-test-filename branch May 30, 2026 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant