File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change 2727 with :
2828 version : 25 # Optional, will use the latest if omitted.
2929 path : app/code # Optional, will be used when event is not a pull request.
30+ severity : 8 # Optional, will use phpcs default of 5 if not specified.
31+ warning_severity : 4 # Optional, will use severity value if not specified.
32+ error_severity : 7 # Optional, will use severity value if not specified.
3033` ` `
Original file line number Diff line number Diff line change @@ -21,6 +21,21 @@ inputs:
2121 version :
2222 required : false
2323 description : " The version of the coding standard to use. If not provided, will use the latest version."
24+
25+ severity :
26+ required : false
27+ default : " "
28+ description : " The minimum severity required to display an error or warning (default: 5)"
29+
30+ warning_severity :
31+ required : false
32+ default : " "
33+ description : " The minimum severity required to display a warning"
34+
35+ error_severity :
36+ required : false
37+ default : " "
38+ description : " The minimum severity required to display an error"
2439
2540runs :
2641 using : composite
6176
6277 - name : Coding Standard Check
6378 shell : bash
64- run : ../standard/vendor/bin/phpcs --standard=Magento2 ${{ github.event_name == 'pull_request' && steps.changed-files.outputs.files || inputs.path }}
79+ run : |
80+ ../standard/vendor/bin/phpcs --standard=Magento2 \
81+ $([ -n "${{ inputs.severity }}" ] && echo "--severity=${{ inputs.severity }}") \
82+ $([ -n "${{ inputs.warning_severity }}" ] && echo "--warning-severity=${{ inputs.warning_severity }}") \
83+ $([ -n "${{ inputs.error_severity }}" ] && echo "--error-severity=${{ inputs.error_severity }}") \
84+ ${{ github.event_name == 'pull_request' && steps.changed-files.outputs.files || inputs.path }}
6585 working-directory : project
You can’t perform that action at this time.
0 commit comments