feat: make suffix configurable (#10) - #11
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR implements issue #10 by making the “file reference” environment-variable suffix configurable (defaulting to _FILE) so users can choose alternatives like __FILE.
Changes:
- Add support for
FILEENV_SUFFIXand pass the configured suffix into environment resolution logic. - Update documentation to describe
FILEENV_SUFFIXand clarify default/override behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| README.md | Documents new configuration option FILEENV_SUFFIX and updates behavior notes accordingly. |
| main.go | Introduces config loading for the suffix and uses it when detecting and resolving *_FILE-style variables. |
Suppressed comments (1)
main.go:116
excludeEnvVarandincludeEnvVarare referenced here but are not defined anywhere in the repo, which will prevent the project from compiling.
func isControlVar(key string) bool {
switch key {
case suffixEnvVar, excludeEnvVar, includeEnvVar:
return true
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
schroedan
force-pushed
the
feat/fileenv-suffix
branch
from
August 26, 2026 19:55
279db2e to
5b0090d
Compare
schroedan
force-pushed
the
feat/fileenv-suffix
branch
from
August 26, 2026 20:01
5b0090d to
0c352b8
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
Suppressed comments (1)
README.md:185
- These behavior bullets still describe
_FILE-specific semantics, but the suffix is now configurable. As written,FOO_FILE/_FILEare only correct for the default suffix; for non-default suffixes the “wins” and “empty variable name” rules still apply but forFOO<suffix>/<suffix>.
- The suffix is `_FILE` by default; override it with `FILEENV_SUFFIX` (see
[Configuration](#configuration)).
- If both `FOO` and `FOO_FILE` are set, `FOO_FILE` wins and overwrites `FOO`.
- Empty variable names (i.e. a variable literally named `_FILE`) are ignored.
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.
Closes #10