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 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..9819c80c --- /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