X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=tools%2Fccanlint%2Ffile_analysis.c;h=852ecbfce851c31d85078d4a21d3e7657dcc6e8d;hp=8760630a7549e22a4d981c24fe69fab407d37043;hb=6a4d45337811b56d947e52f031b9ca0c955fcb6c;hpb=3ea7b4d695237414015f33674d6ba01009e77fd1 diff --git a/tools/ccanlint/file_analysis.c b/tools/ccanlint/file_analysis.c index 8760630a..852ecbfc 100644 --- a/tools/ccanlint/file_analysis.c +++ b/tools/ccanlint/file_analysis.c @@ -27,7 +27,7 @@ struct list_head *get_ccan_file_docs(struct ccan_file *f) { if (!f->doc_sections) { get_ccan_file_lines(f); - f->doc_sections = extract_doc_sections(f->lines); + f->doc_sections = extract_doc_sections(f->lines, f->name); } return f->doc_sections; } @@ -394,3 +394,13 @@ void score_file_error(struct score *score, struct ccan_file *f, unsigned line, score->error = talloc_append_string(score->error, "... more (use -vv to see them all)\n"); } + +char *get_or_compile_info(const void *ctx, const char *dir) +{ + struct manifest *m = get_manifest(NULL, dir); + + if (!m->info_file->compiled[COMPILE_NORMAL]) + m->info_file->compiled[COMPILE_NORMAL] = compile_info(m, dir); + + return m->info_file->compiled[COMPILE_NORMAL]; +}