From 4944c16961eecb46a01c24910605e0a91f3ea114 Mon Sep 17 00:00:00 2001 From: alex Date: Mon, 30 Jun 2025 19:55:19 -0400 Subject: [PATCH 1/3] dd note on config requirements --- docs/tools/phpcs.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/tools/phpcs.md b/docs/tools/phpcs.md index 390c620f..468e23dc 100644 --- a/docs/tools/phpcs.md +++ b/docs/tools/phpcs.md @@ -39,6 +39,15 @@ PHPCS supports many coding standards including: - **PEAR**: PEAR coding standard - **Zend**: Zend Framework coding standard +## Configuration + +PHPCS requires a configuration file to run. CodeRabbit will only run PHPCS if one of the following configuration files is found: + +- `phpcs.xml` - XML configuration file +- `phpcs.xml.dist` - Distributed XML configuration file + +CodeRabbit will not run PHPCS if no configuration file is found. + ## Links - [PHPCS GitHub Repository](https://github.com/squizlabs/PHP_CodeSniffer) From 1b884b9276f9acbaf924d9ece8173499692b3274 Mon Sep 17 00:00:00 2001 From: alex Date: Mon, 30 Jun 2025 19:56:33 -0400 Subject: [PATCH 2/3] update phpmd --- docs/tools/phpmd.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/tools/phpmd.md b/docs/tools/phpmd.md index fb191a27..be773f6a 100644 --- a/docs/tools/phpmd.md +++ b/docs/tools/phpmd.md @@ -29,6 +29,13 @@ PHPMD can detect various code quality issues including: - **Unused Code Rules**: Detects unused variables, parameters, methods, and classes - **Size Rules**: Identifies overly complex methods and classes +### Review Mode Behavior + +CodeRabbit's review mode affects which PHPMD rules are applied: + +- **Chill Mode**: Only checks for unused code (`unusedcode` rule set) +- **Assertive Mode**: Checks all rule sets including clean code, code size, controversial rules, design issues, naming conventions, and unused code (`cleancode,codesize,controversial,design,naming,unusedcode`) + ## Links - [PHPMD Official Website](https://phpmd.org/) From c85771277b6c39b014ac030ec2c6f8e9ddb4795b Mon Sep 17 00:00:00 2001 From: alex Date: Mon, 30 Jun 2025 19:56:49 -0400 Subject: [PATCH 3/3] fix name --- docs/tools/phpmd.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tools/phpmd.md b/docs/tools/phpmd.md index be773f6a..84df5b11 100644 --- a/docs/tools/phpmd.md +++ b/docs/tools/phpmd.md @@ -34,7 +34,7 @@ PHPMD can detect various code quality issues including: CodeRabbit's review mode affects which PHPMD rules are applied: - **Chill Mode**: Only checks for unused code (`unusedcode` rule set) -- **Assertive Mode**: Checks all rule sets including clean code, code size, controversial rules, design issues, naming conventions, and unused code (`cleancode,codesize,controversial,design,naming,unusedcode`) +- **Nitpick Mode**: Checks all rule sets including clean code, code size, controversial rules, design issues, naming conventions, and unused code (`cleancode,codesize,controversial,design,naming,unusedcode`) ## Links