File tree Expand file tree Collapse file tree 3 files changed +27
-1
lines changed Expand file tree Collapse file tree 3 files changed +27
-1
lines changed Original file line number Diff line number Diff line change 40
40
"bramus/monolog-colored-line-formatter" : " ^3.0" ,
41
41
"symfony/var-dumper" : " ^5.2" ,
42
42
"phpunit/phpunit" : " 8.5.21" ,
43
- "clean/phpdoc-md" : " ^0.19.1"
43
+ "clean/phpdoc-md" : " ^0.19.1" ,
44
+ "phpmd/phpmd" : " @stable"
44
45
}
45
46
}
Original file line number Diff line number Diff line change @@ -235,4 +235,13 @@ And then:
235
235
```
236
236
ddev exec PHP_CS_FIXER_IGNORE_ENV=1 ./my-own-modules/crowdsec-php-lib/tools/php-cs-fixer/vendor/bin/php-cs-fixer fix ./my-own-modules/crowdsec-php-lib
237
237
238
+ ```
239
+
240
+ #### PHP Mess Detector
241
+
242
+ To use the ` phpmd ` tool, you can run:
243
+
244
+ ```
245
+ ddev phpmd ./my-own-modules/crowdsec-php-lib tools/phpmd/rulesets.xml src
246
+
238
247
```
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" ?>
2
+ <ruleset name =" CrowdSec PHP Lib rule set"
3
+ xmlns =" http://pmd.sf.net/ruleset/1.0.0"
4
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
5
+ xsi : schemaLocation =" http://pmd.sf.net/ruleset/1.0.0
6
+ http://pmd.sf.net/ruleset_xml_schema.xsd"
7
+ xsi : noNamespaceSchemaLocation ="
8
+ http://pmd.sf.net/ruleset_xml_schema.xsd" >
9
+ <description >
10
+ Rule set that checks CrowdSec PHP lib
11
+ </description >
12
+
13
+ <rule ref =" rulesets/codesize.xml" />
14
+ <rule ref =" rulesets/cleancode.xml" />
15
+ <rule ref =" rulesets/unusedcode.xml" />
16
+ </ruleset >
You can’t perform that action at this time.
0 commit comments