X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=tools%2Fccanlint%2Ftests%2Fexamples_relevant.c;h=311c4787492e7bfb2ad1d3cbacbb1f314fe38ce4;hp=283e78c10cda3914ce3ccaaad328c31be94d5f89;hb=af5b1a18948345c5f9f9abf4eda3ab9fe0aa9a9f;hpb=598b7d1351176b73247855893fd49c5e38f5800a diff --git a/tools/ccanlint/tests/examples_relevant.c b/tools/ccanlint/tests/examples_relevant.c index 283e78c1..311c4787 100644 --- a/tools/ccanlint/tests/examples_relevant.c +++ b/tools/ccanlint/tests/examples_relevant.c @@ -15,7 +15,6 @@ #include 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;