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 <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7572
Tested-by: jenkins
This commit is contained in:
Antonio Borneo 2023-04-02 20:47:41 +02:00
parent 8edfdb02ed
commit 017e61feb4
1 changed files with 7 additions and 0 deletions

View File

@ -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: