X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=tools%2Fccanlint%2Ftests%2Fno_trailing_whitespace.c;h=f046a248cc3e8bcfa818c9f213ca022efa2ad397;hb=758ab1f402b4af3cccac09548b709deca17ef930;hp=a66fd74c3c57a8fdd7f42f352975bbe681366665;hpb=051db34fb275491d4d5dfa5bf7970e8e525766d8;p=ccan diff --git a/tools/ccanlint/tests/no_trailing_whitespace.c b/tools/ccanlint/tests/no_trailing_whitespace.c index a66fd74c..f046a248 100644 --- a/tools/ccanlint/tests/no_trailing_whitespace.c +++ b/tools/ccanlint/tests/no_trailing_whitespace.c @@ -30,21 +30,21 @@ 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); for (i = 0; i < f->num_lines; i++) { char *err = get_trailing_whitespace(lines[i]); - if (err) { - score->error = "Trailing whitespace" - " found"; - score_file_error(score, f, i+1, err); - } + if (err) + score_file_error(score, f, i+1, + "%s", err); } } } if (!score->error) { - score->pass = true; score->score = score->total; } }