-
Notifications
You must be signed in to change notification settings - Fork 5
Dot env files #48
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
Dot env files #48
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,21 @@ | ||||||||||||||||
DATABASE_URL postgres://user:pass@localhost:5432/dbname | ||||||||||||||||
API_KEY = someapikey | ||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Trim spaces around “=” to preserve the value Most parsers treat the leading space as part of the key and the trailing space as part of the value ( -API_KEY = someapikey
+API_KEY=someapikey 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||||||||||||
SECRET_KEY = this is a bad secret | ||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Never commit real secrets to VCS
🤖 Prompt for AI Agents
|
||||||||||||||||
123TOKEN=abcdefg | ||||||||||||||||
API-KEY=invalidformat | ||||||||||||||||
Comment on lines
+4
to
+5
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Invalid variable names (cannot start with digits or contain “-”)
-123TOKEN=abcdefg
-API-KEY=invalidformat
+TOKEN_123=abcdefg
+API_KEY_INVALIDFORMAT=invalidformat 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||||||||||||
PASSWORD="my"pass"word" | ||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Broken quoting creates an unterminated value Interleaving -PASSWORD="my"pass"word"
+PASSWORD='my"pass"word' 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||||||||||||
REDIS_URL=redis://localhost:6379 # trailing comment | ||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Inline comments are parsed as part of the value Most dotenv loaders do not support -REDIS_URL=redis://localhost:6379 # trailing comment
+# Comment: local redis
+REDIS_URL=redis://localhost:6379 🤖 Prompt for AI Agents
|
||||||||||||||||
BROKEN_VAR= | ||||||||||||||||
DUPLICATE_KEY=value1 | ||||||||||||||||
DUPLICATE_KEY=value2 | ||||||||||||||||
Comment on lines
+9
to
+10
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Duplicate keys – only the last one wins
🤖 Prompt for AI Agents
|
||||||||||||||||
UNICODE_TEST=✓🚫💥 | ||||||||||||||||
MULTILINE_VAR=This is a | ||||||||||||||||
bad idea | ||||||||||||||||
Comment on lines
+12
to
+13
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Multiline values are not supported without explicit quoting Lines 12-13 split a value over two lines, corrupting every subsequent variable. Use -MULTILINE_VAR=This is a
-bad idea
+MULTILINE_VAR="This is a\nbad idea" 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||||||||||||
HOST_URL=${UNDEFINED_HOST}/path | ||||||||||||||||
FEATURE_ENABLED=yes | ||||||||||||||||
DEBUG_MODE=on | ||||||||||||||||
SPACED_VAR=value | ||||||||||||||||
MISSING_EQUALS_SIGN somevalue | ||||||||||||||||
Comment on lines
+17
to
+18
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Leading space and missing “=”
- SPACED_VAR=value
+SPACED_VAR=value
-MISSING_EQUALS_SIGN somevalue
+MISSING_EQUALS_SIGN=somevalue 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||||||||||||
BAD_QUOTES='unfinished | ||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unterminated single-quoted string Add the closing quote or switch to double quotes. -BAD_QUOTES='unfinished
+BAD_QUOTES='unfinished' 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||||||||||||
INVALID_UTF8=\x80\x81\x82 | ||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Invalid UTF-8 escape sequences
🤖 Prompt for AI Agents
|
||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing “=” delimiter will break every .env parser
DATABASE_URL
is missing the required=
. Nothing after the key is parsed, so the variable is effectively undefined.📝 Committable suggestion
🤖 Prompt for AI Agents