idea-php-dotenv-plugin
idea-php-dotenv-plugin copied to clipboard
False positive inspection for "trailing whitespace"
Steps to Reproduce
- Create a file named
.env - Add
FOO=bar # testto the file's contents - Look at the inspections (e.g. in the "Problems" tab)
Expected Result
No problems are being reported, since this syntax is completely valid.
Actual Result
Squiggly line is added and "Line has trailing whitespace" is being reported.
Sources
Here are some references which should support my claim that:
this syntax is completely valid
- https://github.com/motdotla/dotenv?tab=readme-ov-file#comments
- https://github.com/vlucas/phpdotenv?tab=readme-ov-file#comments
- https://github.com/bkeepers/dotenv?tab=readme-ov-file#comments
- https://docs.docker.com/compose/environment-variables/variable-interpolation/#env-file-syntax
Example Code
# This is a comment
SECRET_KEY=YOURSECRETKEYGOESHERE # comment
SECRET_HASH="something-with-a-#-hash"