docs(go): document pre_run field in test provider_state struct form#39
Merged
Conversation
Adds pre_run to the test struct form docs in both the main Go plugin page and its Claude Code reference twin. Triggered by hephbuild/heph#111 (feat(plugin-go): test pre_run shell lines via provider state)
⚡ Cloudflare Pages preview
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary\n\nDocuments the
pre_runfield added to the Go plugin'steststruct form in hephbuild/heph#111.\n\n-website/docs/plugins/go.md— addspre_runto the "Test environment" section: description update, code example, and field table.\n-plugins/heph-go/skills/heph-go/references/go-plugin.md— mirrors the same change in the Claude Code reference twin (field table, code example, and Recognized keys description).\n\n### Whatpre_rundoes\n\nWhen set in atest = {...}provider state,pre_runis a list of shell lines that run before the test binary. An empty list (the default) keeps the existingexecdriver; a non-empty list switches thetest/xtesttargets to thebashdriver:\n\npython title=\"BUILD\"\nprovider_state(\n provider = \"go\",\n test = {\n \"pre_run\": [\"export FOO=bar\", \"mkdir -p ./scratch\"],\n },\n)\n\n\nLike other struct-form keys, it is package-scoped (does not inherit to descendants) and affects the cache key.\n\n## Triggered by\n\nhephbuild/heph#111 — feat(plugin-go): test pre_run shell lines via provider state"Generated by Claude Code