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,
9 unsigned int *timeleft,
12 struct list_head *infodocs = get_ccan_file_docs(m->info_file);
13 struct doc_section *d;
18 list_for_each(infodocs, d, list) {
21 if (!streq(d->type, "summary"))
24 /* line following summary line should be empty */
25 after = m->info_file->lines[d->srcline+1];
26 if (after && strspn(after, " *") != strlen(after)) {
29 score_file_error(score, m->info_file, d->srcline+1,
31 m->info_file->lines[d->srcline],
32 m->info_file->lines[d->srcline+1]);
37 struct ccanlint info_summary_single_line = {
38 .key = "info_summary_single_line",
39 .name = "Module has a single line summary in _info",
40 .check = check_info_summary_single_line,
41 .needs = "info_exists"
44 REGISTER_TEST(info_summary_single_line);