From 1c1d438442f7c6bb9d1d093f7242d5b1495bd78c Mon Sep 17 00:00:00 2001 From: nimratcoderabbit Date: Wed, 9 Jul 2025 10:05:19 -0500 Subject: [PATCH 1/5] Updating docs for Py Config (#436) * Updating docs for Py Config * tools * Changelog --- docs/tools/flake8.md | 8 ++++++++ docs/tools/pylint.md | 11 +++++++++++ 2 files changed, 19 insertions(+) diff --git a/docs/tools/flake8.md b/docs/tools/flake8.md index b0a29761..953187c7 100644 --- a/docs/tools/flake8.md +++ b/docs/tools/flake8.md @@ -18,6 +18,14 @@ Flake8 will run on files with the following extensions: - `*.py` +## Configuration + +Flake8 supports the following config files: + +- `.flake8` + +CodeRabbit will not run Flake8 if no config file is found. + ## Features Flake8 can detect many issues such as: diff --git a/docs/tools/pylint.md b/docs/tools/pylint.md index f6793106..65dcf703 100644 --- a/docs/tools/pylint.md +++ b/docs/tools/pylint.md @@ -18,6 +18,17 @@ Pylint will run on files with the following extensions: - `*.py` +## Configuration + +Pylint supports the following config files: + +- `.pylintrc` +- `pylintrc` +- `.pylintrc.toml` +- `pylintrc.toml` + +CodeRabbit will not run Pylint if no config file is found. + ## Features Pylint can detect many issues such as: From f4a00ae493d7b5eae3a96ca4d1df1b32aab2ef63 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 9 Jul 2025 15:22:15 +0000 Subject: [PATCH 2/5] Update schema.v2.json --- static/schema/schema.v2.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/static/schema/schema.v2.json b/static/schema/schema.v2.json index 4dcaeba6..89085d9b 100644 --- a/static/schema/schema.v2.json +++ b/static/schema/schema.v2.json @@ -336,6 +336,14 @@ }, "default": [], "description": "Base branches (other than the default branch) to review. Accepts regex patterns." + }, + "ignore_usernames": { + "type": "array", + "items": { + "type": "string" + }, + "default": [], + "description": "Ignore reviewing pull requests by these usernames. These should match the Git platform usernames exactly, not the email addresses." } }, "additionalProperties": false, From fbe161f1a8264d99d426e1340c2145579785d697 Mon Sep 17 00:00:00 2001 From: Hardik Gupta <40640596+hardikkgupta@users.noreply.github.com> Date: Wed, 9 Jul 2025 12:11:53 -0500 Subject: [PATCH 3/5] docs: clarify PR review eligibility (#378) (#396) --- docs/guides/code-review-overview.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/guides/code-review-overview.md b/docs/guides/code-review-overview.md index cd511c76..32ffdb88 100644 --- a/docs/guides/code-review-overview.md +++ b/docs/guides/code-review-overview.md @@ -4,6 +4,8 @@ description: An overview of CodeRabbit's core code review features. sidebar_label: Overview --- +import ProPlanNotice from '@site/src/components/ProPlanNotice.mdx' + The central feature of CodeRabbit is its ability to proactively review new pull requests on your code repository. @@ -42,6 +44,15 @@ perform a code review: - If an open pull request that CodeRabbit has already reviewed gets modified with another commit, then CodeRabbit performs an incremental review that focuses on the new commit. +### Which pull requests get automatically reviewed {#eligibility} + +CodeRabbit automatically reviews a pull request when **either** of the following statements is true: + +- The pull request is in a public repository. CodeRabbit reviews pull requests against the main branch of your public repositories by default. This feature is available to every subscription tier, including the free plan. +- The pull request is in a private repository and your organization is on the Pro plan with a seat assigned to you. Only under this condition does CodeRabbit review private-repository pull requests. + + + ## Interact with CodeRabbit reviews {#interact} After CodeRabbit attaches its initial code-review comment to a pull request, you can From 784b90453866977e2033864fda440587be1774aa Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 9 Jul 2025 18:18:38 +0000 Subject: [PATCH 4/5] Update schema.v2.json --- static/schema/schema.v2.json | 8 -------- 1 file changed, 8 deletions(-) diff --git a/static/schema/schema.v2.json b/static/schema/schema.v2.json index 89085d9b..4dcaeba6 100644 --- a/static/schema/schema.v2.json +++ b/static/schema/schema.v2.json @@ -336,14 +336,6 @@ }, "default": [], "description": "Base branches (other than the default branch) to review. Accepts regex patterns." - }, - "ignore_usernames": { - "type": "array", - "items": { - "type": "string" - }, - "default": [], - "description": "Ignore reviewing pull requests by these usernames. These should match the Git platform usernames exactly, not the email addresses." } }, "additionalProperties": false, From 6a197c55736243acf999a16d8d6bfa1a46e52fee Mon Sep 17 00:00:00 2001 From: Hardik Gupta <40640596+hardikkgupta@users.noreply.github.com> Date: Wed, 9 Jul 2025 15:06:48 -0500 Subject: [PATCH 5/5] docs: add Flake8, PHPMD, PHPCS to template & reference (#428) (#429) --- docs/reference/configuration.md | 123 ++++++++++++++++++++++++++++++++ docs/reference/yaml-template.md | 6 ++ sidebars.ts | 3 + 3 files changed, 132 insertions(+) diff --git a/docs/reference/configuration.md b/docs/reference/configuration.md index 5109ba5a..bd0b3e8e 100644 --- a/docs/reference/configuration.md +++ b/docs/reference/configuration.md @@ -2850,6 +2850,47 @@ ESLint is a static code analysis tool for JavaScript files. ESLint is a static code analysis tool for JavaScript files. +### Flake8 + +Flake8 is a static code analysis tool for Python files. + +#### Enable Flake8 + + + + + + + + + + + + + +
LocationReview > Tools > Flake8 > Enable
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.flake8.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +Flake8 is a static code analysis tool for Python files. + ### GitHub Checks GitHub Checks integration configuration. @@ -3708,6 +3749,88 @@ Enable PMD. Optional path to the PMD configuration file relative to the repository. +### PHPMD + +PHPMD is a static code analysis tool for PHP files. + +#### Enable PHPMD + + + + + + + + + + + + + +
LocationReview > Tools > Enable PHPMD
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.phpmd.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +PHPMD is a static code analysis tool for PHP files. + +### PHPCS + +PHPCS is a static code analysis and coding-standard checker for PHP (plus JS/CSS) files. + +#### Enable PHPCS + + + + + + + + + + + + + +
LocationReview > Tools > Enable PHPCS
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.phpcs.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +PHPCS is a static code analysis tool for PHP, JavaScript and CSS files. + ### Prisma Schema Linting Configuration for Prisma Schema linting to ensure schema file quality diff --git a/docs/reference/yaml-template.md b/docs/reference/yaml-template.md index 6a670197..9fac39e2 100644 --- a/docs/reference/yaml-template.md +++ b/docs/reference/yaml-template.md @@ -107,6 +107,8 @@ reviews: config_file: "" eslint: enabled: true + flake8: + enabled: true rubocop: enabled: true buf: @@ -118,6 +120,10 @@ reviews: pmd: enabled: true config_file: "" + phpmd: + enabled: true + phpcs: + enabled: true cppcheck: enabled: true semgrep: diff --git a/sidebars.ts b/sidebars.ts index 5b42e112..3cc53ff0 100644 --- a/sidebars.ts +++ b/sidebars.ts @@ -182,6 +182,7 @@ const sidebars: SidebarsConfig = { "tools/cppcheck", "tools/detekt", "tools/eslint", + "tools/flake8", "tools/gitleaks", "tools/golangci-lint", "tools/hadolint", @@ -189,6 +190,8 @@ const sidebars: SidebarsConfig = { "tools/luacheck", "tools/markdownlint", "tools/oxlint", + "tools/phpcs", + "tools/phpmd", "tools/phpstan", "tools/pipeline-remediation", "tools/pmd",