X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=tools%2Fccanlint%2Fccanlint.h;h=9cb858f7d6a02e715eda56ac38d92d133e846066;hb=1d415706a6e948fe6dcc3b5dab45812b297f77a1;hp=954bb30a0b9d06782bdd1c3ecc817666c21b1673;hpb=e2a53df3e1f5912c872f1906912053354d0d0c63;p=ccan diff --git a/tools/ccanlint/ccanlint.h b/tools/ccanlint/ccanlint.h index 954bb30a..9cb858f7 100644 --- a/tools/ccanlint/ccanlint.h +++ b/tools/ccanlint/ccanlint.h @@ -2,11 +2,13 @@ #define CCAN_LINT_H #include "config.h" #include +#include #include #include #include #include "../doc_extract.h" #include "../manifest.h" +#include "../tools.h" #include "licenses.h" AUTODATA_TYPE(ccanlint_tests, struct ccanlint); @@ -55,7 +57,7 @@ struct ccanlint { bool compulsory; /* If timeleft is set to 0, means it timed out. - * score is the result, and a talloc context freed after all our + * score is the result, and a tal context freed after all our * depends are done. */ void (*check)(struct manifest *m, unsigned int *timeleft, struct score *score); @@ -137,7 +139,7 @@ enum line_compiled get_ccan_line_pp(struct pp_conditions *cond, /* Get token if it's equal to token. */ bool get_token(const char **line, const char *token); -/* Talloc copy of symbol token, or NULL. Increment line. */ +/* Tal copy of symbol token, or NULL. Increment line. */ char *get_symbol_token(void *ctx, const char **line); /* Similarly for ->doc_sections */ @@ -150,6 +152,10 @@ char **per_file_options(const struct ccanlint *test, struct ccan_file *f); void score_file_error(struct score *, struct ccan_file *f, unsigned line, const char *errorfmt, ...); +/* Append message to the score->error */ +void score_error(struct score *score, const char * source, + const char *errorfmt, ...); + /* Start a command in the background. */ void run_command_async(const void *ctx, unsigned int time_ms, const char *fmt, ...); @@ -188,8 +194,11 @@ extern bool safe_mode; /* Did the user want to keep all the results? */ extern bool keep_results; -/* Compiler and CFLAGS, from config.h if available. */ -extern const char *compiler, *cflags; +/* Did we find non-ccan dependencies? */ +extern bool non_ccan_deps; + +/* Did we fail to build? */ +extern bool build_failed; /* Contents of config.h (or NULL if not found) */ extern const char *config_header;