Skip to content

Preview/dot env #67

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
reviews:
path_filters: ["**/.env",".env"]
5 changes: 5 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PORT=3000
PORT=8000
Comment on lines +1 to +2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Duplicate PORT declaration – choose one and document the intent
Two different values (3000 and 8000) are defined for the same variable. Most dotenv loaders resolve to the last occurrence (8000), silently shadowing the first value and confusing anyone skimming the file. Keep a single entry or differentiate (e.g., PORT_DEV / PORT_PROD) and comment which one is expected.

-PORT=3000
-PORT=8000
+# Port used by the application
+PORT=3000
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
PORT=3000
PORT=8000
# Port used by the application
PORT=3000
🧰 Tools
🪛 dotenv-linter (3.3.0)

[warning] 2-2: [DuplicatedKey] The PORT key is duplicated

🤖 Prompt for AI Agents
In the .env file at lines 1 to 2, there are duplicate declarations of the PORT
variable with conflicting values 3000 and 8000. Remove one of the entries or
rename them to distinct variables like PORT_DEV and PORT_PROD, and add comments
explaining which environment each is for to avoid confusion and ensure clarity
on which port is used.

DB_URL postgres://localhost
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Malformed line – missing = delimiter
DB_URL postgres://localhost will not be parsed by common dotenv libraries. Use an equals sign and, if the value contains special characters, quote it.

-DB_URL postgres://localhost
+DB_URL=postgres://localhost
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
DB_URL postgres://localhost
DB_URL=postgres://localhost
🧰 Tools
🪛 dotenv-linter (3.3.0)

[warning] 3-3: [IncorrectDelimiter] The DB_URL postgres://localhost key has incorrect delimiter


[warning] 3-3: [KeyWithoutValue] The DB_URL postgres://localhost key should be with a value or have an equal sign


[warning] 3-3: [LowercaseKey] The DB_URL postgres://localhost key should be in uppercase


[warning] 3-3: [UnorderedKey] The DB_URL postgres://localhost key should go before the PORT key

🤖 Prompt for AI Agents
In the .env file at line 3, the environment variable assignment is missing the
'=' delimiter. Replace the space between 'DB_URL' and 'postgres://localhost'
with an '=' sign. If the URL contains special characters, enclose the value in
quotes to ensure proper parsing by dotenv libraries.

SECRET_KEY=12345
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Avoid committing real secrets to VCS
Storing actual SECRET_KEY values in the repository leaks credentials. Either replace with a placeholder (__REPLACE_ME__) or move this file to .gitignore and commit a redacted .env.example instead.

🧰 Tools
🪛 dotenv-linter (3.3.0)

[warning] 4-4: [LeadingCharacter] Invalid leading character detected

🤖 Prompt for AI Agents
In the .env file at line 4, the SECRET_KEY is set to a real value which risks
leaking credentials. Replace the actual secret with a placeholder like
__REPLACE_ME__ or remove the .env file from version control by adding it to
.gitignore, then commit a redacted .env.example file with placeholder values
instead.

⚠️ Potential issue

Leading whitespace breaks variable name
The preceding space makes the key literally " SECRET_KEY", not SECRET_KEY. Remove the space.

- SECRET_KEY=12345
+SECRET_KEY=12345
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
SECRET_KEY=12345
SECRET_KEY=12345
🧰 Tools
🪛 dotenv-linter (3.3.0)

[warning] 4-4: [LeadingCharacter] Invalid leading character detected

🤖 Prompt for AI Agents
In the .env file at line 4, there is a leading whitespace before the variable
name SECRET_KEY which causes the key to be interpreted incorrectly. Remove the
leading space so that the line starts directly with SECRET_KEY=12345 without any
preceding whitespace.

UNQUOTED VALUE
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Invalid syntax – not a KEY=VALUE pair
UNQUOTED VALUE is ignored by dotenv loaders and may cause runtime surprises. Convert to a proper declaration or drop it.

-UNQUOTED VALUE
+UNQUOTED_VALUE="Some value with spaces"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
UNQUOTED VALUE
-UNQUOTED VALUE
+UNQUOTED_VALUE="Some value with spaces"
🧰 Tools
🪛 dotenv-linter (3.3.0)

[warning] 5-5: [IncorrectDelimiter] The UNQUOTED VALUE key has incorrect delimiter


[warning] 5-5: [KeyWithoutValue] The UNQUOTED VALUE key should be with a value or have an equal sign

🤖 Prompt for AI Agents
In the .env file at line 5, there is an invalid syntax line "UNQUOTED VALUE"
which is not a proper KEY=VALUE pair and will be ignored by dotenv loaders. To
fix this, either remove this line entirely if it is unnecessary or convert it
into a valid environment variable declaration by assigning it a key and value in
the format KEY=VALUE.