File tree Expand file tree Collapse file tree 3 files changed +32
-0
lines changed Expand file tree Collapse file tree 3 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,8 @@ The following configuration options are available:
6969+ `severity` - The minimum severity required to display an error or warning
7070+ `error_severity` - The minimum severity required to display an error
7171+ `warning_severity` - The minimum severity required to display a warning
72+ + `ignore_warnings_on_exit` - Exit with a zero error code despite the presence of warnings (1 = true, default 0 = false).
73+ + `ignore_errors_on_exit` - xit with a zero error code despite the presence of errors (1 = true, default 0 = false).
7274+ `args` - Extra arguments to pass to the phpcs binary
7375
7476If you require other configurations of PHPMD, please request them in the [Github issue tracker].
Original file line number Diff line number Diff line change @@ -81,6 +81,14 @@ inputs:
8181 description : The minimum severity required to display a warning
8282 required : false
8383
84+ ignore_warnings_on_exit :
85+ description : Exit with a zero error code despite the presence of warnings
86+ required : false
87+
88+ ignore_errors_on_exit :
89+ description : Exit with a zero error code despite the presence of errors
90+ required : false
91+
8492 args :
8593 description : Extra arguments to pass to the phpcs binary
8694 required : false
@@ -109,6 +117,8 @@ runs:
109117 ACTION_SEVERITY : ${{ inputs.severity }}
110118 ACTION_ERROR_SEVERITY : ${{ inputs.error_severity }}
111119 ACTION_WARNING_SEVERITY : ${{ inputs.warning_severity }}
120+ ACTION_IGNORE_WARNINGS_ON_EXIT : ${{ inputs.ignore_warnings_on_exit }}
121+ ACTION_IGNORE_ERRORS_ON_EXIT : ${{ inputs.ignore_errors_on_exit }}
112122 ACTION_ARGS : ${{ inputs.args }}
113123
114124 id : phpcs_run
Original file line number Diff line number Diff line change 9595 command_string+=(--warning-severity=" $ACTION_WARNING_SEVERITY " )
9696fi
9797
98+ if [ -n " $ACTION_IGNORE_WARNINGS_ON_EXIT " ]
99+ then
100+ case " $ACTION_IGNORE_WARNINGS_ON_EXIT " in
101+ ' true' |' 1' ) normalised_value=1 ;;
102+ ' false' |' 0' ) normalised_value=0 ;;
103+ * ) normalised_value=0 ;;
104+ esac
105+ command_string+=(--runtime-set ignore_warnings_on_exit " $normalised_value " )
106+ fi
107+
108+ if [ -n " $ACTION_IGNORE_ERRORS_ON_EXIT " ]
109+ then
110+ case " $ACTION_IGNORE_ERRORS_ON_EXIT " in
111+ ' true' |' 1' ) normalised_value=1 ;;
112+ ' false' |' 0' ) normalised_value=0 ;;
113+ * ) normalised_value=0 ;;
114+ esac
115+ command_string+=(--runtime-set ignore_errors_on_exit " $ACTION_IGNORE_ERRORS_ON_EXIT " )
116+ fi
117+
98118if [ -n " $ACTION_ARGS " ]
99119then
100120 command_string+=($ACTION_ARGS )
You can’t perform that action at this time.
0 commit comments