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) diff --git a/docs/tools/phpmd.md b/docs/tools/phpmd.md index fb191a27..84df5b11 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) +- **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 - [PHPMD Official Website](https://phpmd.org/)