From 58978114d93d5010d15c8be792f9e444da5fb250 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 22 May 2020 16:32:39 -0600 Subject: checkpatch.pl: Request a test when a new command is added This request is made with nearly every new command. Point to some docs on how to do it. Signed-off-by: Simon Glass --- scripts/checkpatch.pl | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'scripts/checkpatch.pl') diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 2654f9e5f7..cf620c8614 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2255,6 +2255,12 @@ sub u_boot_line { WARN("LIVETREE", "Use the livetree API (dev_read_...)\n" . $herecurr); } + + # add tests for new commands + if ($line =~ /^\+.*do_($Ident)\(struct cmd_tbl.*/) { + WARN("CMD_TEST", + "Possible new command - make sure you add a test\n" . $herecurr); + } } sub process { -- cgit v1.2.1