You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+57-1
Original file line number
Diff line number
Diff line change
@@ -13,4 +13,60 @@ PHP Mess Detector (PHPMD) takes a given PHP source code base and looks for sever
13
13
Usage
14
14
-----
15
15
16
-
// TODO
16
+
```yaml
17
+
name: CI
18
+
19
+
on: [push]
20
+
21
+
jobs:
22
+
build-and-test:
23
+
runs-on: ubuntu-latest
24
+
25
+
steps:
26
+
- uses: actions/checkout@v3
27
+
28
+
- name: Composer install
29
+
uses: php-actions/composer@v6
30
+
31
+
- name: PHP Mess Detector
32
+
uses: php-actions/phpmd@v1
33
+
with:
34
+
php_version: 8.1
35
+
path: src/
36
+
output: text
37
+
ruleset: test/phpmd/ruleset.xml
38
+
```
39
+
40
+
Version numbers
41
+
---------------
42
+
43
+
This action is released with semantic version numbers, but also tagged so the latest major release's tag always points to the latest release within the matching major version.
44
+
45
+
Please feel free to use `uses: php-actions/phpmd@v1` to always run the latest version of v1, or `uses: php-actions/[email protected]` to specify the exact release.
46
+
47
+
Inputs
48
+
------
49
+
50
+
The following configuration options are available:
51
+
52
+
+ `version` - What version of PHPMD to use
53
+
+ `php_version` - What version of PHP to use
54
+
+ `vendored_phpmd_path` - Path to a vendored phpmd binary
55
+
+ `path` - A php source code filename or directory. Can be a comma-separated string
56
+
+ `ruleset` - A ruleset filename or a comma-separated string of rulesetfilenames
57
+
+ `output` - A report format
58
+
+ `minimumpriority` - rule priority threshold; rules with lower priority than this will not be used
59
+
+ `reportfile` - send report output to a file; default to STDOUT
60
+
+ `suffixes` - comma-separated string of valid source code filename extensions, e.g. php,phtml
61
+
+ `exclude` - comma-separated string of patterns that are used to ignore directories. Use asterisks to exclude by pattern. For example *src/foo/*.php or *src/foo/*
62
+
+ `strict` - also report those nodes with a @SuppressWarnings annotation
63
+
+ `args` - Extra arguments to pass to the phpmd binary
64
+
65
+
If you require other configurations of PHPMD, please request them in the [Github issue tracker].
66
+
67
+
*****
68
+
69
+
If you found this repository helpful, please consider [sponsoring the developer][sponsor].
0 commit comments