Skip to content

Add --allow-empty to skip intentionally empty keys - #1

Merged
Gulliby merged 1 commit into
mainfrom
feature/allow-empty
Oct 11, 2026
Merged

Gulliby merged 1 commit into
mainfrom
feature/allow-empty

Conversation

@Gulliby

@Gulliby Gulliby commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

Before: intentionally blank variables such as SENTRY_DSN= fail every check with exit 1.

After: --allow-empty KEY (repeatable, comma-separated, PREFIX* patterns) excludes the named keys from the empty check only. Missing and extra keys are still reported, and there is no output change without the option.

How: option parsing and validation in src/cli.ts (invalid values exit 2 with a clear message), the empty-key filter in src/compare.ts, a README options row and example (checked against the real output by a test), and new tests in tests/cli.test.ts, tests/compare.test.ts and tests/project.test.ts.

Tests: 108 pass (91 before). Typecheck, lint and build are clean.

Built with BAKED (bench loop round 03)

Variables that are intentionally blank, such as SENTRY_DSN= in a local
.env, made every check fail with exit 1. The new repeatable option
--allow-empty KEY (comma-separated lists and PREFIX* patterns supported)
excludes the named keys from the empty-value check only. Missing and
extra keys are still reported, and output is unchanged without the option.
@Gulliby
Gulliby merged commit b897e9a into main Oct 11, 2026
8 of 9 checks passed
@Gulliby
Gulliby deleted the feature/allow-empty branch October 11, 2026 17:52
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