1 #include <tools/ccanlint/ccanlint.h>
2 #include <tools/tools.h>
4 #include <ccan/str/str.h>
6 static void check_info_summary_single_line(struct manifest *m,
7 unsigned int *timeleft UNNEEDED,
10 struct list_head *infodocs = get_ccan_file_docs(m->info_file);
11 struct doc_section *d;
16 list_for_each(infodocs, d, list) {
19 if (!streq(d->type, "summary"))
22 /* line following summary line should be empty */
23 after = m->info_file->lines[d->srcline+1];
24 if (after && strspn(after, " *") != strlen(after)) {
27 score_file_error(score, m->info_file, d->srcline+1,
29 m->info_file->lines[d->srcline],
30 m->info_file->lines[d->srcline+1]);
35 struct ccanlint info_summary_single_line = {
36 .key = "info_summary_single_line",
37 .name = "Module has a single line summary in _info",
38 .check = check_info_summary_single_line,
39 .needs = "info_exists"
42 REGISTER_TEST(info_summary_single_line);