Skip to content

Add env var support for --format-hide-empty-pkg#560

Open
endigma wants to merge 1 commit into
gotestyourself:mainfrom
endigma:endigma/hide-empty-pkg-env
Open

Add env var support for --format-hide-empty-pkg#560
endigma wants to merge 1 commit into
gotestyourself:mainfrom
endigma:endigma/hide-empty-pkg-env

Conversation

@endigma

@endigma endigma commented Mar 23, 2026

Copy link
Copy Markdown

Summary

  • Add GOTESTSUM_FORMAT_HIDE_EMPTY_PKG environment variable to configure the --format-hide-empty-pkg flag
  • Uses the existing truthyFlag(lookEnvWithDefault(...)) pattern already used by --junitfile-hide-empty-pkg and --junitfile-hide-skipped-tests
  • Accepts true, yes, or 1 (case-insensitive); defaults to false when unset

Motivation

The --format-hide-empty-pkg flag is useful for coding LLMs reading gotestsum output. The easiest way to force LLM run gotestsum invocations to use this option is an environment variable.

Allow configuring the --format-hide-empty-pkg flag via the
GOTESTSUM_FORMAT_HIDE_EMPTY_PKG environment variable, consistent with
how other boolean flags like --junitfile-hide-empty-pkg already support
environment variable configuration.
@endigma

endigma commented Mar 31, 2026

Copy link
Copy Markdown
Author

Hi @dnephin, anything I can do to help move this along?

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