Repository navigation
52 lines (52 loc) · 1.72 KB
/
Copy pathcode-standards.yml
File metadata and controls
52 lines (52 loc) · 1.72 KB
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
name: 'Reusable: Code Standards'
on:
workflow_call:
inputs:
php-version:
description: Tool runtime PHP, at least 8.3; also used for syntax parsing.
default: '8.3'
type: string
config:
description: Optional consumer-relative ECS config.
default: ''
type: string
magic-numbers:
description: Explicitly enable native Magic Numbers analysis of the exact PR selection.
default: false
type: boolean
magic-numbers-policy:
description: report or fail for verified findings; operational errors always fail.
default: report
type: string
rector:
description: Explicitly enable native semantic preview using rector-config, never apply.
default: false
type: boolean
rector-policy:
description: report or fail for verified proposed changes; operational errors always fail.
default: report
type: string
rector-config:
description: Consumer-relative native PHP configuration with explicit target and rules.
default: ''
type: string
permissions: {}
jobs:
check:
permissions:
contents: read
uses: ./.github/workflows/code-standards-check.yml
with:
php-version: ${{ inputs.php-version }}
config: ${{ inputs.config }}
optional-analysis:
permissions:
contents: read
uses: ./.github/workflows/code-standards-analysis.yml
with:
php-version: ${{ inputs.php-version }}
magic-numbers: ${{ inputs.magic-numbers }}
magic-numbers-policy: ${{ inputs.magic-numbers-policy }}
rector: ${{ inputs.rector }}
rector-policy: ${{ inputs.rector-policy }}
rector-config: ${{ inputs.rector-config }}