dotenv-linter
dotenv-linter copied to clipboard
Check for missing keys
Have you considered adding a rule to check for missing keys?
One possible use for that: on a system where application is running for some time and with periodical updates, a situation is possible, where an update will introduce a new key and that should be checked in .env
Not sure if this is in scope of a linter though, or should this be enforced by sane defaults/exceptions on application end.
Can you please provide an example?
Something like dotenv-linter .env --strict-keys=SHOULD_BE_PRESENT,OTHER_REQUIRED
?
I was more about validating a .env file against some example or template one. Like, validating the current .env against version-controlled .env.example.