]> git.ozlabs.org Git - ccan/blobdiff - tools/ccanlint/tests/info_documentation_exists.c
ccanlint: use ccan/autodata
[ccan] / tools / ccanlint / tests / info_documentation_exists.c
index 6d914648ca19e3852de76632d3b2fac69523f476..7be0b797532727a6fe1acd8f9af7e1ac52780837 100644 (file)
 #include <ccan/noerr/noerr.h>
 #include <ccan/grab_file/grab_file.h>
 
-REGISTER_TEST(info_documentation_exists);
+static void check_info_documentation_exists(struct manifest *m,
+                                           unsigned int *timeleft,
+                                           struct score *score);
+
+static struct ccanlint info_documentation_exists = {
+       .key = "info_documentation_exists",
+       .name = "Module has documentation in _info",
+       .check = check_info_documentation_exists,
+       .needs = "info_exists"
+};
 
 static void create_info_template_doc(struct manifest *m, struct score *score)
 {
@@ -95,10 +104,5 @@ static void check_info_documentation_exists(struct manifest *m,
        }
 }
 
-struct ccanlint info_documentation_exists = {
-       .key = "info_documentation_exists",
-       .name = "Module has documentation in _info",
-       .check = check_info_documentation_exists,
-       .needs = "info_exists"
-};
+REGISTER_TEST(info_documentation_exists);