File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -314,11 +314,11 @@ validate_commit_message() {
314
314
# 11. Avoid commit subject that simply states a file update (e.g. "Update console.c")
315
315
# ------------------------------------------------------------------------------
316
316
317
- if [[ ${ COMMIT_SUBJECT_TO_PROCESS} =~ ^Update[[:space:]]+ ([^[:space:]]+)$ ]]; then
318
- candidate=" ${BASH_REMATCH[1 ]} "
317
+ if [[ " $ COMMIT_SUBJECT_TO_PROCESS" =~ ^( Update| Modify | Change | Fix | Refine | Improve | Revise) [[:space:]]+ ([^[:space:]]+)$ ]]; then
318
+ candidate=" ${BASH_REMATCH[2 ]} "
319
319
# Only warn if the candidate filename ends with .c or .h
320
- if [[ $candidate =~ \. (c| h)$ ]]; then
321
- add_warning 1 " Avoid using just a filename like '$candidate '. Provide a functional, meaningful description"
320
+ if [[ " $candidate " =~ \. (c| h)$ ]]; then
321
+ add_warning 1 " Avoid using just a filename like '$candidate '. Provide a functional, meaningful description"
322
322
fi
323
323
fi
324
324
You can’t perform that action at this time.
0 commit comments