]> git.ozlabs.org Git - ccan/blobdiff - tools/ccanlint/tests/trailing_whitespace.c
ccanlint: use up to three -v to mean more verbosity.
[ccan] / tools / ccanlint / tests / trailing_whitespace.c
index 80bf42c49705cc9d0deacd1cfd68db7d9ff8dc05..439fc06d1b67907bf5096a2c4457afb89a533a6a 100644 (file)
@@ -3,6 +3,7 @@
 #include <ccan/talloc/talloc.h>
 #include <ccan/str/str.h>
 
+/* FIXME: only print full analysis if verbose >= 2.  */
 static char *report_on_trailing_whitespace(const char *line)
 {
        const char *e = strchr(line, 0);
@@ -36,6 +37,8 @@ static void *check_trailing_whitespace(struct manifest *m,
 static const char *describe_trailing_whitespace(struct manifest *m,
                                                void *check_result)
 {
+       if (!verbose)
+               return NULL;
        return talloc_asprintf(check_result, 
                               "Some source files have trailing whitespace:\n"
                               "%s", (char *)check_result);