Content-Length: 14132 | pFad | http://github.com/coderabbitai/coderabbit-docs/pull/429.patch
thub.com
From 15e6d467e8383a9102eca18fe65faf86800a31c5 Mon Sep 17 00:00:00 2001
From: electricplayer <40640596+electricplayer@users.noreply.github.com>
Date: Wed, 2 Jul 2025 23:58:15 -0500
Subject: [PATCH 1/4] docs: add Flake8, PHPMD, PHPCS to template & reference
(fix #428)
---
docs/reference/configuration.md | 123 ++++++++++++++++++++++++++++++++
docs/reference/yaml-template.md | 6 ++
docs/tools/flake8.md | 37 ++++++++++
3 files changed, 166 insertions(+)
create mode 100644 docs/tools/flake8.md
diff --git a/docs/reference/configuration.md b/docs/reference/configuration.md
index 5109ba5a..965491eb 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
+
+
+
+
+
+
+ Location |
+ Review > Tools > Enable Flake8 |
+
+
+ Default |
+ true |
+
+
+
+
+
+
+
+ Field |
+ `reviews.tools.flake8.enabled` |
+
+
+ Datatype |
+ boolean |
+
+
+ Default |
+ true |
+
+
+
+
+
+Flake8 is a static code analysis tool for Python files.
+
### GitHub Checks
GitHub Checks integration configuration.
@@ -3671,6 +3712,88 @@ PMD is an extensible multilanguage static code analyzer. It’s mainly concerned
Enable PMD.
+### PHPMD
+
+PHPMD is a static code analysis tool for PHP files.
+
+#### Enable PHPMD
+
+
+
+
+
+
+ Location |
+ Review > Tools > Enable PHPMD |
+
+
+ Default |
+ true |
+
+
+
+
+
+
+
+ Field |
+ `reviews.tools.phpmd.enabled` |
+
+
+ Datatype |
+ boolean |
+
+
+ Default |
+ true |
+
+
+
+
+
+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
+
+
+
+
+
+
+ Location |
+ Review > Tools > Enable PHPCS |
+
+
+ Default |
+ true |
+
+
+
+
+
+
+
+ Field |
+ `reviews.tools.phpcs.enabled` |
+
+
+ Datatype |
+ boolean |
+
+
+ Default |
+ true |
+
+
+
+
+
+PHPCS is a static code analysis tool for PHP, JavaScript and CSS files.
+
#### Config File
diff --git a/docs/reference/yaml-template.md b/docs/reference/yaml-template.md
index cb9e8473..67aa96ff 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/docs/tools/flake8.md b/docs/tools/flake8.md
new file mode 100644
index 00000000..af38dc42
--- /dev/null
+++ b/docs/tools/flake8.md
@@ -0,0 +1,37 @@
+---
+title: Flake8
+sidebar_label: Flake8
+description: CodeRabbit's guide to Flake8.
+---
+
+```mdx-code-block
+import ProPlanNotice from '@site/src/components/ProPlanNotice.mdx';
+
+
+```
+
+[Flake8](https://flake8.pycqa.org/en/latest/) is a static code analysis tool for Python that wraps PyFlakes (error detection), pycodestyle (PEP 8 style rules) and McCabe (cyclomatic-complexity measurement) to catch a wide range of issues in a single pass.
+
+## Supported Files
+
+Flake8 runs on files with the following extension:
+
+- `*.py`
+
+## Features
+Flake8 can detect many issues, including:
+
+- PEP 8 style-guide violations
+- Unused or re-defined variables and imports
+- Undefined names / variables
+- Cyclomatic-complexity over threshold (default 10)
+- Error-prone constructs (e.g., comparison to literal True / False)
+- Select / ignore rule filtering (--select, --extend-ignore)
+- Extensible plugin ecosystem and custom rule support
+
+## Links
+
+- [Flake8 Official Website](https://flake8.pycqa.org/en/latest/)
+- [Flake8 PyPI Page](https://pypi.org/project/flake8/)
+- [Flake8 GitHub Repository](https://github.com/PyCQA/flake8)
+- [User Guide](https://flake8.pycqa.org/en/latest/)
\ No newline at end of file
From 5871712fadde2e186f9e3d7dbb5aed4eca8ff71f Mon Sep 17 00:00:00 2001
From: electricplayer <40640596+electricplayer@users.noreply.github.com>
Date: Thu, 3 Jul 2025 15:43:04 -0500
Subject: [PATCH 2/4] docs: wrap / --extend-ignore (review feedback)
---
docs/reference/configuration.md | 50 ++++++++++++++++-----------------
docs/tools/flake8.md | 2 +-
2 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/docs/reference/configuration.md b/docs/reference/configuration.md
index 965491eb..bd0b3e8e 100644
--- a/docs/reference/configuration.md
+++ b/docs/reference/configuration.md
@@ -2862,7 +2862,7 @@ Flake8 is a static code analysis tool for Python files.
Location |
- Review > Tools > Enable Flake8 |
+ Review > Tools > Flake8 > Enable |
Default |
@@ -3712,11 +3712,7 @@ PMD is an extensible multilanguage static code analyzer. It’s mainly concerned
Enable PMD.
-### PHPMD
-
-PHPMD is a static code analysis tool for PHP files.
-
-#### Enable PHPMD
+#### Config File
@@ -3724,11 +3720,11 @@ PHPMD is a static code analysis tool for PHP files.
Location |
- Review > Tools > Enable PHPMD |
+ Review > Tools > PMD > Config File |
Default |
- true |
+ _No default_ |
@@ -3737,27 +3733,27 @@ PHPMD is a static code analysis tool for PHP files.
Field |
- `reviews.tools.phpmd.enabled` |
+ `reviews.tools.pmd.config_file` |
Datatype |
- boolean |
+ string |
Default |
- true |
+ _No default_ |
-PHPMD is a static code analysis tool for PHP files.
+Optional path to the PMD configuration file relative to the repository.
-### PHPCS
+### PHPMD
-PHPCS is a static code analysis and coding-standard checker for PHP (plus JS/CSS) files.
+PHPMD is a static code analysis tool for PHP files.
-#### Enable PHPCS
+#### Enable PHPMD
@@ -3765,7 +3761,7 @@ PHPCS is a static code analysis and coding-standard checker for PHP (plus JS/CSS
Location |
- Review > Tools > Enable PHPCS |
+ Review > Tools > Enable PHPMD |
Default |
@@ -3778,7 +3774,7 @@ PHPCS is a static code analysis and coding-standard checker for PHP (plus JS/CSS
Field |
- `reviews.tools.phpcs.enabled` |
+ `reviews.tools.phpmd.enabled` |
Datatype |
@@ -3792,9 +3788,13 @@ PHPCS is a static code analysis and coding-standard checker for PHP (plus JS/CSS
-PHPCS is a static code analysis tool for PHP, JavaScript and CSS files.
+PHPMD is a static code analysis tool for PHP files.
-#### Config File
+### PHPCS
+
+PHPCS is a static code analysis and coding-standard checker for PHP (plus JS/CSS) files.
+
+#### Enable PHPCS
@@ -3802,11 +3802,11 @@ PHPCS is a static code analysis tool for PHP, JavaScript and CSS files.
Location |
- Review > Tools > PMD > Config File |
+ Review > Tools > Enable PHPCS |
Default |
- _No default_ |
+ true |
@@ -3815,21 +3815,21 @@ PHPCS is a static code analysis tool for PHP, JavaScript and CSS files.
Field |
- `reviews.tools.pmd.config_file` |
+ `reviews.tools.phpcs.enabled` |
Datatype |
- string |
+ boolean |
Default |
- _No default_ |
+ true |
-Optional path to the PMD configuration file relative to the repository.
+PHPCS is a static code analysis tool for PHP, JavaScript and CSS files.
### Prisma Schema Linting
diff --git a/docs/tools/flake8.md b/docs/tools/flake8.md
index af38dc42..9819c80c 100644
--- a/docs/tools/flake8.md
+++ b/docs/tools/flake8.md
@@ -26,7 +26,7 @@ Flake8 can detect many issues, including:
- Undefined names / variables
- Cyclomatic-complexity over threshold (default 10)
- Error-prone constructs (e.g., comparison to literal True / False)
-- Select / ignore rule filtering (--select, --extend-ignore)
+- Select / ignore rule filtering (`--select`, `--extend-ignore`)
- Extensible plugin ecosystem and custom rule support
## Links
From de4d61fd8e5f32facbd9054707340d57a148bc64 Mon Sep 17 00:00:00 2001
From: electricplayer <40640596+electricplayer@users.noreply.github.com>
Date: Tue, 8 Jul 2025 15:04:10 -0500
Subject: [PATCH 3/4] docs: remove duplicate flake8
---
docs/tools/flake8.md | 37 -------------------------------------
1 file changed, 37 deletions(-)
delete mode 100644 docs/tools/flake8.md
diff --git a/docs/tools/flake8.md b/docs/tools/flake8.md
deleted file mode 100644
index 9819c80c..00000000
--- a/docs/tools/flake8.md
+++ /dev/null
@@ -1,37 +0,0 @@
----
-title: Flake8
-sidebar_label: Flake8
-description: CodeRabbit's guide to Flake8.
----
-
-```mdx-code-block
-import ProPlanNotice from '@site/src/components/ProPlanNotice.mdx';
-
-
-```
-
-[Flake8](https://flake8.pycqa.org/en/latest/) is a static code analysis tool for Python that wraps PyFlakes (error detection), pycodestyle (PEP 8 style rules) and McCabe (cyclomatic-complexity measurement) to catch a wide range of issues in a single pass.
-
-## Supported Files
-
-Flake8 runs on files with the following extension:
-
-- `*.py`
-
-## Features
-Flake8 can detect many issues, including:
-
-- PEP 8 style-guide violations
-- Unused or re-defined variables and imports
-- Undefined names / variables
-- Cyclomatic-complexity over threshold (default 10)
-- Error-prone constructs (e.g., comparison to literal True / False)
-- Select / ignore rule filtering (`--select`, `--extend-ignore`)
-- Extensible plugin ecosystem and custom rule support
-
-## Links
-
-- [Flake8 Official Website](https://flake8.pycqa.org/en/latest/)
-- [Flake8 PyPI Page](https://pypi.org/project/flake8/)
-- [Flake8 GitHub Repository](https://github.com/PyCQA/flake8)
-- [User Guide](https://flake8.pycqa.org/en/latest/)
\ No newline at end of file
From d194640fd607c8de0fb9b2dda7b5c998f9839cee Mon Sep 17 00:00:00 2001
From: electricplayer <40640596+electricplayer@users.noreply.github.com>
Date: Tue, 8 Jul 2025 15:06:43 -0500
Subject: [PATCH 4/4] expose Flake8, PHPMD & PHPCS in sidebar
---
sidebars.ts | 3 +++
1 file changed, 3 insertions(+)
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",
--- a PPN by Garber Painting Akron. With Image Size Reduction included!Fetched URL: http://github.com/coderabbitai/coderabbit-docs/pull/429.patch
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy