]> git.ozlabs.org Git - ccan/blobdiff - tools/ccanlint/tests/trailing_whitespace.c
ccanlint: rename structures to match keys
[ccan] / tools / ccanlint / tests / trailing_whitespace.c
index 2d344435e9ff908233f9d82babb08a801e5fa4ca..a66fd74c3c57a8fdd7f42f352975bbe681366665 100644 (file)
@@ -37,7 +37,7 @@ static void check_trailing_whitespace(struct manifest *m,
                                char *err = get_trailing_whitespace(lines[i]);
                                if (err) {
                                        score->error = "Trailing whitespace"
-                                               "found";
+                                               " found";
                                        score_file_error(score, f, i+1, err);
                                }
                        }
@@ -49,11 +49,12 @@ static void check_trailing_whitespace(struct manifest *m,
        }
 }
 
-struct ccanlint trailing_whitespace = {
-       .key = "trailing-whitespace",
+struct ccanlint no_trailing_whitespace = {
+       .key = "no_trailing_whitespace",
        .name = "Module's source code has no trailing whitespace",
        .check = check_trailing_whitespace,
+       .needs = ""
 };
 
 
-REGISTER_TEST(trailing_whitespace, NULL);
+REGISTER_TEST(no_trailing_whitespace);