]> www.infradead.org Git - users/borneoa/openocd-next.git/commitdiff
HACKING: add info on ignoring check-patch checks
authorAntonio Borneo <borneo.antonio@gmail.com>
Sun, 2 Apr 2023 18:47:41 +0000 (20:47 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 5 Oct 2024 15:41:30 +0000 (15:41 +0000)
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 <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7572
Tested-by: jenkins
HACKING

diff --git a/HACKING b/HACKING
index 74cbe02e7435e67655c580d95bdbceaed64780a9..9e8cd357fff6fbaf89dd65de24025586ed3b6540 100644 (file)
--- a/HACKING
+++ b/HACKING
@@ -287,6 +287,13 @@ Only for <em>exceptional cases</em>, 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 <em>before</em> 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: