]> git.ozlabs.org Git - ccan/blobdiff - tools/ccanlint/tests/examples_relevant.c
ccanlint: remove argument to -k/--keep
[ccan] / tools / ccanlint / tests / examples_relevant.c
index 283e78c10cda3914ce3ccaaad328c31be94d5f89..311c4787492e7bfb2ad1d3cbacbb1f314fe38ce4 100644 (file)
@@ -15,7 +15,6 @@
 #include <ctype.h>
 
 static void examples_relevant_check(struct manifest *m,
-                                   bool keep,
                                    unsigned int *timeleft,
                                    struct score *score)
 {
@@ -30,6 +29,11 @@ static void examples_relevant_check(struct manifest *m,
                        if (!streq(d->type, "example"))
                                continue;
 
+                       if (!d->function) {
+                               score_file_error(score, f, d->srcline+1,
+                                                "Function name not found in summary line");
+                               continue;
+                       }
                        for (i = 0; i < d->num_lines; i++) {
                                if (strstr(d->lines[i], d->function))
                                        found = true;