X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=tools%2Fccanlint%2Ftests%2Fno_trailing_whitespace.c;h=5c5cf35bb68769ea1276756ac7a34c99147f5b1d;hb=199023653cd6020218fbc4d0712591fc7ee0c5e1;hp=3f41877a31a42a4302fb1c8eb8ff44143450da67;hpb=299dc8f99ca642943db4f0204b5fe31065545d27;p=ccan diff --git a/tools/ccanlint/tests/no_trailing_whitespace.c b/tools/ccanlint/tests/no_trailing_whitespace.c index 3f41877a..5c5cf35b 100644 --- a/tools/ccanlint/tests/no_trailing_whitespace.c +++ b/tools/ccanlint/tests/no_trailing_whitespace.c @@ -22,7 +22,6 @@ static char *get_trailing_whitespace(const char *line) } static void check_trailing_whitespace(struct manifest *m, - bool keep, unsigned int *timeleft, struct score *score) { @@ -30,6 +29,9 @@ static void check_trailing_whitespace(struct manifest *m, struct ccan_file *f; unsigned int i; + /* We don't fail ccanlint for this. */ + score->pass = true; + foreach_ptr(list, &m->c_files, &m->h_files) { list_for_each(list, f, list) { char **lines = get_ccan_file_lines(f); @@ -42,7 +44,6 @@ static void check_trailing_whitespace(struct manifest *m, } } if (!score->error) { - score->pass = true; score->score = score->total; } } @@ -51,7 +52,7 @@ struct ccanlint no_trailing_whitespace = { .key = "no_trailing_whitespace", .name = "Module's source code has no trailing whitespace", .check = check_trailing_whitespace, - .needs = "" + .needs = "info_exists" };