Check for missing keys
KristobalJunta opened this issue · 2 comments
KristobalJunta commented
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.
sobolevn commented
Can you please provide an example?
Something like dotenv-linter .env --strict-keys=SHOULD_BE_PRESENT,OTHER_REQUIRED
?
KristobalJunta commented
I was more about validating a .env file against some example or template one. Like, validating the current .env against version-controlled .env.example.