-
Notifications
You must be signed in to change notification settings - Fork 2
/
action.yml
123 lines (100 loc) · 3.95 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
name: PHP Code Sniffer (php-actions)
description: Run your PHP Code Sniffer tests in your Github Actions.
inputs:
version:
description: What version of PHPCS to use
default: latest
required: false
php_version:
description: What version of PHP to use
default: latest
required: false
vendored_phpcs_path:
description: Path to a vendored phpcs binary
required: false
path:
description: One or more files and/or directories to check
required: true
standard:
description: The name or path of the coding standard to use
required: true
sniffs:
description: A comma separated list of sniff codes to include checking (all sniffs must be part of the specified standard)
required: false
exclude:
description: A comma separated list of sniff codes to exclude from checking (all sniffs must be part of the specified standard)
required: false
ignore:
description: A comma separated list of patterns to ignore files and directories
required: false
tab_width:
description: The number of spaces each tab represents
required: false
report:
description: Print either the "full", "xml", "checkstyle", "csv", "json", "junit", "emacs", "source", "summary", "diff", "svnblame", "gitblame", "hgblame" or "notifysend" report, or specify the path to a custom report class, (the "full" report is printed by default)
required: true
default: full
report_file:
description: Write the report to the specified file path
required: false
report_width:
description: How many columns wide screen reports should be printed or set to "auto" to use current screen width, where supported
required: false
basepath:
description: A path to strip from the front of file paths inside reports
required: false
bootstrap:
description: A comma separated list of files to run before processing begins
required: false
encoding:
description: The encoding of the files being checked (default is utf-8)
required: false
extensions:
description: "A comma separated list of file extensions to check. The type of the file can be specified using: ext/type e.g., module/php,es/js"
required: false
severity:
description: The minimum severity required to display an error or warning
required: false
error_severity:
description: The minimum severity required to display an error
required: false
warning_severity:
description: The minimum severity required to display a warning
required: false
args:
description: Extra arguments to pass to the phpcs binary
required: false
runs:
using: "composite"
steps:
- env:
ACTION_TOKEN: ${{ github.token }}
ACTION_VERSION: ${{ inputs.version }}
ACTION_PHP_VERSION: ${{ inputs.php_version }}
ACTION_PHPCS_PATH: ${{ inputs.vendored_phpcs_path }}
ACTION_PATH: ${{ inputs.path }}
ACTION_STANDARD: ${{ inputs.standard }}
ACTION_SNIFFS: ${{ inputs.sniffs }}
ACTION_EXCLUDE: ${{ inputs.exclude }}
ACTION_IGNORE: ${{ inputs.ignore }}
ACTION_TAB_WIDTH: ${{ inputs.tab_width }}
ACTION_REPORT: ${{ inputs.report }}
ACTION_REPORT_FILE: ${{ inputs.report_file }}
ACTION_REPORT_WIDTH: ${{ inputs.report_width }}
ACTION_BASEPATH: ${{ inputs.basepath }}
ACTION_BOOTSTRAP: ${{ inputs.bootstrap }}
ACTION_ENCODING: ${{ inputs.encoding }}
ACTION_EXTENSIONS: ${{ inputs.extensions }}
ACTION_SEVERITY: ${{ inputs.severity }}
ACTION_ERROR_SEVERITY: ${{ inputs.error_severity }}
ACTION_WARNING_SEVERITY: ${{ inputs.warning_severity }}
ACTION_ARGS: ${{ inputs.args }}
id: phpcs_run
run: |
set -e
bash <(curl -s https://raw.githubusercontent.com/php-actions/php-build/cee5b9fa9fbc4c888e7a62bbb7b8eade18e3c56b/php-build.bash) phpcs
${{ github.action_path }}/phpcs-action.bash
shell: bash
branding:
icon: 'check-square'
color: 'purple'