Skip to content

Dotenv documentation #382

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

Merged
merged 4 commits into from
Jun 6, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Dotenv documentation
  • Loading branch information
nimratcoderabbit committed Jun 5, 2025
commit 3e2f7fab4bdbd121652cfc8fb199746a38a3f65a
15 changes: 15 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,21 @@ sidebar_label: Changelog
description: The latest updates and changes to CodeRabbit.
sidebar_position: 13
---
## June 5, 2025

### New Static Analysis Tool

We're excited to announce that [Dotenv Linter](https://github.com/dotenv-linter/dotenv-linter) is now supported on CodeRabbit!

- **Dotenv Linter**: A fast, opinionated linter for `.env` files. It helps prevent misconfigurations by detecting typos, invalid syntax, and duplicated keys.

Here's why you'll love it:

- 🧪 **Catches common mistakes** in environment files before they cause runtime errors.
- 🚀 **Super fast** with zero config required.
- 📦 **Supports multiple `.env` formats** like `.env.local`, `.env.production`, and more.

For more details, visit our [tools documentation](https://docs.coderabbit.ai/tools/dotenv).

### May 30, 2025

Expand Down
18 changes: 18 additions & 0 deletions docs/tools/dotenv.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Dotenv Linter

**Dotenv Linter** is a lightning-fast linter for `.env` files. It helps ensure your environment files are consistent, typo-free, and follow best practices.

## How It Works in CodeRabbit

CodeRabbit automatically detects `.env`, `.env.local`, and other dotenv-style files and runs `dotenv-linter` on them.

Issues like key duplication, missing values, incorrect formatting, or invalid characters are flagged directly in pull request reviews.

## Configuration

Dotenv Linter works out-of-the-box with zero config. But if needed, you can ignore rules or configure behavior via comments in the `.env` file or project-level config.

## Resources

- [Dotenv Linter GitHub Repo](https://github.com/dotenv-linter/dotenv-linter)

2 changes: 2 additions & 0 deletions docs/tools/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ For an overview of how CodeRabbit uses these tools when generating code reviews,
| Cppcheck | [Cppcheck][Cppcheck] | Code Quality |
| CSS | [Biome][Biome] | Code Quality |
| Docker | [Hadolint][Hadolint], [Checkov][Checkov] | Code Quality, Code Security |
| Environment Files (.env) | [Dotenv Linter][DotenvLinter] | Code Quality |
| GitHub Actions | [actionlint][actionlint], [Pipeline Remediation][Pipeline] | Code Quality, CI/CD Failure Remediation |
| GitLab Pipelines | [Pipeline Remediation][Pipeline] | CI/CD Failure Remediation |
| Go | [golangci-lint][golangci-lint] | Code Quality |
Expand Down Expand Up @@ -78,3 +79,4 @@ For an overview of how CodeRabbit uses these tools when generating code reviews,
[Brakeman]: /tools/brakeman.md
[Clippy]: /tools/clippy.md
[Pylint]: /tools/pylint.md
[DotenvLinter]: /tools/dotenv.md
Loading