How to silence linux kernel checkpatch.pl ERROR: Missing Signed-off-by: line(s)

How to silence linux kernel checkpatch.pl ERROR: Missing Signed-off-by: line(s)

我在我的 C 代码中使用 Linux 内核风格,尽管它与内核无关。 运行 checkpatch.pl 产生 ERROR: Missing Signed-off-by: line(s)。如何忽略它?

要故意使 ERROR: Missing Signed-off-by: line(s) 静音,可以传递 --no-signoff 参数,例如:

git show | checkpatch.pl --no-tree --no-signoff

这也可以添加到 .checkpatch.conf 文件的新行中,以避免必须键入它。