Skip to content

Commit 7a1fb66

Browse files
Fix/php tools (#421)
* dd note on config requirements * update phpmd * fix name
1 parent c34cd4c commit 7a1fb66

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

docs/tools/phpcs.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,15 @@ PHPCS supports many coding standards including:
3939
- **PEAR**: PEAR coding standard
4040
- **Zend**: Zend Framework coding standard
4141

42+
## Configuration
43+
44+
PHPCS requires a configuration file to run. CodeRabbit will only run PHPCS if one of the following configuration files is found:
45+
46+
- `phpcs.xml` - XML configuration file
47+
- `phpcs.xml.dist` - Distributed XML configuration file
48+
49+
CodeRabbit will not run PHPCS if no configuration file is found.
50+
4251
## Links
4352

4453
- [PHPCS GitHub Repository](https://github.com/squizlabs/PHP_CodeSniffer)

docs/tools/phpmd.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ PHPMD can detect various code quality issues including:
2929
- **Unused Code Rules**: Detects unused variables, parameters, methods, and classes
3030
- **Size Rules**: Identifies overly complex methods and classes
3131

32+
### Review Mode Behavior
33+
34+
CodeRabbit's review mode affects which PHPMD rules are applied:
35+
36+
- **Chill Mode**: Only checks for unused code (`unusedcode` rule set)
37+
- **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`)
38+
3239
## Links
3340

3441
- [PHPMD Official Website](https://phpmd.org/)

0 commit comments

Comments
 (0)