X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=tools%2Fccanlint%2Fccanlint.c;h=8acad9329e4c7280d0fef58eb8b833cf9ca7cd72;hb=598b7d1351176b73247855893fd49c5e38f5800a;hp=6bfc6d15bd1debf7ad7355da0ce3ba2181e2dde8;hpb=2421664fb0d146fd500a0def4368fee9f8f2fdf9;p=ccan diff --git a/tools/ccanlint/ccanlint.c b/tools/ccanlint/ccanlint.c index 6bfc6d15..8acad932 100644 --- a/tools/ccanlint/ccanlint.c +++ b/tools/ccanlint/ccanlint.c @@ -149,26 +149,8 @@ static bool run_test(struct ccanlint *i, } if ((!quiet && !score->pass) || verbose) { - struct file_error *f; - unsigned int lines = 1; - if (score->error) - printf("%s%s\n", score->error, - list_empty(&score->per_file_errors) ? "" : ":"); - - list_for_each(&score->per_file_errors, f, list) { - if (f->line) - printf("%s:%u:%s\n", - f->file->fullname, f->line, f->error); - else if (f->file) - printf("%s:%s\n", f->file->fullname, f->error); - else - printf("%s\n", f->error); - if (verbose < 2 && ++lines > 5) { - printf("... more (use -vv to see them all)\n"); - break; - } - } + printf("%s", score->error); if (!quiet && !score->pass && i->handle) i->handle(m, score); } @@ -517,6 +499,8 @@ int main(int argc, char *argv[]) if (dir[0] != '/') dir = talloc_asprintf_append(NULL, "%s/%s", base_dir, dir); + while (strends(dir, "/")) + dir[strlen(dir)-1] = '\0'; if (dir != base_dir) prefix = talloc_append_string(talloc_basename(NULL, dir), ": "); if (verbose >= 3)