Skip to content

feat: make suffix configurable (#10) - #11

Merged
schroedan merged 1 commit into
mainfrom
feat/fileenv-suffix
Aug 26, 2026
Merged

feat: make suffix configurable (#10)#11
schroedan merged 1 commit into
mainfrom
feat/fileenv-suffix

Conversation

@schroedan

Copy link
Copy Markdown
Contributor

Closes #10

Copilot AI lite review requested due to automatic review settings August 26, 2026 19:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_SUFFIX and pass the configured suffix into environment resolution logic.
  • Update documentation to describe FILEENV_SUFFIX and 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

  • excludeEnvVar and includeEnvVar are 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.

Comment thread main.go
Copilot AI review requested due to automatic review settings August 26, 2026 19:55
@schroedan
schroedan force-pushed the feat/fileenv-suffix branch from 279db2e to 5b0090d Compare August 26, 2026 19:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread README.md
Comment thread main.go
Copilot AI review requested due to automatic review settings August 26, 2026 20:01
@schroedan
schroedan force-pushed the feat/fileenv-suffix branch from 5b0090d to 0c352b8 Compare August 26, 2026 20:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/_FILE are only correct for the default suffix; for non-default suffixes the “wins” and “empty variable name” rules still apply but for FOO<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.

Comment thread main.go
@schroedan
schroedan merged commit 0f7aab9 into main Aug 26, 2026
3 checks passed
@schroedan
schroedan deleted the feat/fileenv-suffix branch August 26, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Make suffix configurable

2 participants