Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't expect any particular casing convention #56

Closed
mcandre opened this issue Mar 2, 2019 · 2 comments
Closed

Don't expect any particular casing convention #56

mcandre opened this issue Mar 2, 2019 · 2 comments

Comments

@mcandre
Copy link

mcandre commented Mar 2, 2019

While it is good for shell script authors to apply conventions of variable casing to distinguish between local and environment variables, this is unfortunately not a practical rule to use for environment variables in general.

Some applications have already begun to expect lowercase variable names (http_proxy), while other applications expect uppercase names (HTTP_PROXY). I wish a quick transition to a uniform standard would occur, but this has not been the case. So while the designer of a new environment-facing application should by all means prefer uppercase, we cannot reasonably apply a casing rule to .env files, because of the existing, mature exceptions.

Note that both lowercase and uppercase variables may be needed, for applications that need to apply proxy configurations to different sub-application calls. Hence, dotenv-linter should probably neither warn for duplicate variables as long as the declarations differ in casing.

@sobolevn
Copy link
Member

sobolevn commented Mar 2, 2019

Hey, @mcandre! Thanks for your feedback.

This feature is planned for the next major release. I am planning to make an exception mechanism. Something similar to noqa in flake8. This will eliminate the need to reason about lower and uppercases. Just use noqa where you need to use lowercase variables for some reason.

Or disable this check completely via --ignore flag.

By the way, I invite you to collaborate on this feature. I would appreciate some help!

@sobolevn
Copy link
Member

sobolevn commented Dec 4, 2019

I am going to merge it with #31

@sobolevn sobolevn closed this as completed Dec 4, 2019
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

No branches or pull requests

2 participants