1 #include <tools/ccanlint/ccanlint.h>
2 #include <tools/tools.h>
4 #include <ccan/talloc/talloc.h>
5 #include <ccan/str/str.h>
7 static void check_info_summary_single_line(struct manifest *m,
8 unsigned int *timeleft,
11 struct list_head *infodocs = get_ccan_file_docs(m->info_file);
12 struct doc_section *d;
17 list_for_each(infodocs, d, list) {
20 if (!streq(d->type, "summary"))
23 /* line following summary line should be empty */
24 after = m->info_file->lines[d->srcline+1];
25 if (after && strspn(after, " *") != strlen(after)) {
28 score_file_error(score, m->info_file, d->srcline+1,
30 m->info_file->lines[d->srcline],
31 m->info_file->lines[d->srcline+1]);
36 struct ccanlint info_summary_single_line = {
37 .key = "info_summary_single_line",
38 .name = "Module has a single line summary in _info",
39 .check = check_info_summary_single_line,
40 .needs = "info_exists"
43 REGISTER_TEST(info_summary_single_line);