X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=tools%2Fccanlint%2Fccanlint.c;h=330866d15f1f9365ba336893bb7e36382ccb55fa;hb=729fc5b931c8eb26f192399d8aa7064f9af058df;hp=968f655e397f2719217bd4d8ed8f49002787175e;hpb=32a31d9e4fb1f312a47ae8c237ac30d6c1567ccd;p=ccan diff --git a/tools/ccanlint/ccanlint.c b/tools/ccanlint/ccanlint.c index 968f655e..330866d1 100644 --- a/tools/ccanlint/ccanlint.c +++ b/tools/ccanlint/ccanlint.c @@ -119,8 +119,13 @@ static bool run_test(struct ccanlint *i, result = i->check(m); if (!result) { - if (verbose) - printf(" %s: OK\n", i->name); + if (verbose) { + printf(" %s: OK", i->name); + if (i->total_score) + printf(" (+%u/%u)", + i->total_score, i->total_score); + printf("\n"); + } if (i->total_score) { *score += i->total_score; *total_score += i->total_score; @@ -141,6 +146,10 @@ static bool run_test(struct ccanlint *i, *total_score += i->total_score; *score += this_score; + if (verbose) { + printf(" %s: FAIL (+%u/%u)\n", + i->name, this_score, i->total_score); + } if (!quiet) { printf("%s\n", i->describe(m, result)); @@ -255,8 +264,6 @@ int main(int argc, char *argv[]) prefix = talloc_append_string(talloc_basename(NULL, optarg), ": "); - if (chdir(optarg) != 0) - err(1, "Changing into directory '%s'", optarg); break; case 's': summary = true;