From 3e2f7fab4bdbd121652cfc8fb199746a38a3f65a Mon Sep 17 00:00:00 2001 From: nimratcoderabbit Date: Thu, 5 Jun 2025 15:54:41 -0400 Subject: [PATCH 1/3] Dotenv documentation --- docs/changelog.md | 15 +++++++++++++++ docs/tools/dotenv.md | 18 ++++++++++++++++++ docs/tools/list.md | 2 ++ 3 files changed, 35 insertions(+) create mode 100644 docs/tools/dotenv.md diff --git a/docs/changelog.md b/docs/changelog.md index 2a990f62..dd840f0d 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -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 diff --git a/docs/tools/dotenv.md b/docs/tools/dotenv.md new file mode 100644 index 00000000..60d33af1 --- /dev/null +++ b/docs/tools/dotenv.md @@ -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) + diff --git a/docs/tools/list.md b/docs/tools/list.md index b372bccd..7a106a78 100644 --- a/docs/tools/list.md +++ b/docs/tools/list.md @@ -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 | @@ -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 From 4bcaa2608de93a81b04fe7452ecf9bb06977e19a Mon Sep 17 00:00:00 2001 From: nimratcoderabbit Date: Thu, 5 Jun 2025 15:58:53 -0400 Subject: [PATCH 2/3] Prettier check --- docs/changelog.md | 1 + docs/tools/dotenv.md | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/changelog.md b/docs/changelog.md index dd840f0d..9bb6f214 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -4,6 +4,7 @@ sidebar_label: Changelog description: The latest updates and changes to CodeRabbit. sidebar_position: 13 --- + ## June 5, 2025 ### New Static Analysis Tool diff --git a/docs/tools/dotenv.md b/docs/tools/dotenv.md index 60d33af1..f0117ab3 100644 --- a/docs/tools/dotenv.md +++ b/docs/tools/dotenv.md @@ -15,4 +15,3 @@ Dotenv Linter works out-of-the-box with zero config. But if needed, you can igno ## Resources - [Dotenv Linter GitHub Repo](https://github.com/dotenv-linter/dotenv-linter) - From b2b33a2c6c454a011a34981087c6badd542a7d64 Mon Sep 17 00:00:00 2001 From: alex Date: Fri, 6 Jun 2025 11:37:06 -0400 Subject: [PATCH 3/3] fix files --- docs/changelog.md | 22 ++++------------------ docs/tools/dotenv.md | 34 +++++++++++++++++++++++++--------- 2 files changed, 29 insertions(+), 27 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index 9bb6f214..6ad52b08 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -7,27 +7,13 @@ sidebar_position: 13 ## June 5, 2025 -### New Static Analysis Tool +### Enhanced Static Analysis: Dotenv Linter and Pylint Support -We're excited to announce that [Dotenv Linter](https://github.com/dotenv-linter/dotenv-linter) is now supported on CodeRabbit! +We're excited to announce that two new static analysis tools are 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. +- [Dotenv Linter](https://github.com/dotenv-linter/dotenv-linter) is a fast, opinionated linter for `.env` files that 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 - -#### New Static Analysis Tool - -We're excited to announce that [Pylint](https://github.com/PyCQA/pylint) is now supported on CodeRabbit! - -- **Pylint**: A widely used static analysis and code quality tool for Python. It checks for errors, enforces a coding standard, and looks for code smells in your Python codebase by analyzing Python files. +- [Pylint](https://github.com/PyCQA/pylint) is a widely used static analysis and code quality tool for Python. It checks for errors, enforces coding standards, and looks for code smells in your Python codebase. ## May 25, 2025 diff --git a/docs/tools/dotenv.md b/docs/tools/dotenv.md index f0117ab3..cac2613f 100644 --- a/docs/tools/dotenv.md +++ b/docs/tools/dotenv.md @@ -1,17 +1,33 @@ -# Dotenv Linter +--- +title: Dotenv Linter +sidebar_label: Dotenv Linter +description: CodeRabbit's guide to 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. +```mdx-code-block +import ProPlanNotice from '@site/src/components/ProPlanNotice.mdx'; -## How It Works in CodeRabbit + +``` -CodeRabbit automatically detects `.env`, `.env.local`, and other dotenv-style files and runs `dotenv-linter` on them. +[Dotenv Linter](https://github.com/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. -Issues like key duplication, missing values, incorrect formatting, or invalid characters are flagged directly in pull request reviews. +:::note -## Configuration +Dotenv Linter does not require configuration to run and automatically anlysises `.env` files. If no configuration file is found, it will use default settings. -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 +## Features -- [Dotenv Linter GitHub Repo](https://github.com/dotenv-linter/dotenv-linter) +Dotenv Linter can detect: + +- Key duplication +- Missing values +- Incorrect formatting +- Invalid characters +- And many more issues + +## Links + +- [Dotenv Linter GitHub Repository](https://github.com/dotenv-linter/dotenv-linter)