From 017e61feb44b71ac013ae4c7f2cfa3e7ca3323ae Mon Sep 17 00:00:00 2001 From: Antonio Borneo Date: Sun, 2 Apr 2023 20:47:41 +0200 Subject: [PATCH] HACKING: add info on ignoring check-patch checks Due to checkpatch internal state machine, the field 'Checkpatch-ignore:' must be in the commit message before the 'Signed-off-by:' line. Report it in the documentation and add that multiple 'Checkpatch-ignore:' lines are allowed. Change-Id: I770cdc4cb5b33bcf63c860c154ab3cbd4785ad20 Signed-off-by: Antonio Borneo Reviewed-on: https://review.openocd.org/c/openocd/+/7572 Tested-by: jenkins --- HACKING | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/HACKING b/HACKING index 74cbe02e7..9e8cd357f 100644 --- a/HACKING +++ b/HACKING @@ -287,6 +287,13 @@ Only for exceptional cases, it is allowed to submit patches to Gerrit with the special field 'Checkpatch-ignore:' in the commit message. This field will cause checkpatch to ignore the error types listed in the field, only for the patch itself. +For errors in the commit message, the special field has to be put in +the commit message before the line that produces the error. +The special field must be added before the 'Signed-off-by:' +line, otherwise it is ignored. +To ignore multiple errors, either add multiple lines with the special +field or add multiple error types, separated by space or commas, in a +single line. The error type is printed by checkpatch on failure. For example the names of Windows APIs mix lower and upper case chars, in violation of OpenOCD coding style, triggering a 'CAMELCASE' error: