Browse Source

Make ccanlint tests all positive: ie. "has _info.c file: FAILED".

Rusty Russell 16 years ago
parent
commit
15290c3feb
3 changed files with 8 additions and 8 deletions
  1. 1 1
      tools/ccanlint/Makefile
  2. 6 6
      tools/ccanlint/has_info.c
  3. 1 1
      tools/ccanlint/trailing_whitespace.c

+ 1 - 1
tools/ccanlint/Makefile

@@ -1,4 +1,4 @@
-OBJS := tools/ccanlint/no_info.o \
+OBJS := tools/ccanlint/has_info.o \
 	tools/ccanlint/has_main_header.o \
 	tools/ccanlint/has_tests.o \
 	tools/ccanlint/trailing_whitespace.o \

+ 6 - 6
tools/ccanlint/no_info.c → tools/ccanlint/has_info.c

@@ -11,14 +11,14 @@
 #include <string.h>
 #include <ccan/noerr/noerr.h>
 
-static void *check_no_info(struct manifest *m)
+static void *check_has_info(struct manifest *m)
 {
 	if (m->info_file)
 		return NULL;
 	return m;
 }
 
-static const char *describe_no_info(struct manifest *m, void *check_result)
+static const char *describe_has_info(struct manifest *m, void *check_result)
 {
 	return "You have no _info.c file.\n\n"
 	"The file _info.c contains the metadata for a ccan package: things\n"
@@ -70,9 +70,9 @@ static void create_info_template(struct manifest *m, void *check_result)
 	fclose(info);
 }
 
-struct ccanlint no_info = {
-	.name = "No _info.c file",
-	.check = check_no_info,
-	.describe = describe_no_info,
+struct ccanlint has_info = {
+	.name = "Has _info.c file",
+	.check = check_has_info,
+	.describe = describe_has_info,
 	.handle = create_info_template,
 };

+ 1 - 1
tools/ccanlint/trailing_whitespace.c

@@ -40,7 +40,7 @@ static const char *describe_trailing_whitespace(struct manifest *m,
 }
 
 struct ccanlint trailing_whitespace = {
-	.name = "Lines with unnecessary trailing whitespace",
+	.name = "No lines with unnecessary trailing whitespace",
 	.total_score = 1,
 	.check = check_trailing_whitespace,
 	.describe = describe_trailing_whitespace,