Commit 43ea8915 authored by Rusty Russell's avatar Rusty Russell

ccanlint: use dgraph module.

Instead of a linked list of tests, we use dgraph and strmap.
parent 64bd9ff9
......@@ -4,6 +4,7 @@ TEST_OBJS := $(TEST_CFILES:.c=.o)
CORE_OBJS := \
ccan/asort/asort.o \
ccan/btree/btree.o \
ccan/dgraph/dgraph.o \
ccan/foreach/foreach.o \
ccan/grab_file/grab_file.o \
ccan/hash/hash.o \
......@@ -17,6 +18,7 @@ CORE_OBJS := \
ccan/read_write_all/read_write_all.o \
ccan/str/str.o ccan/str/debug.o \
ccan/str_talloc/str_talloc.o \
ccan/strmap/strmap.o \
ccan/talloc/talloc.o \
ccan/talloc_link/talloc_link.o \
ccan/time/time.o \
......
This diff is collapsed.
......@@ -2,6 +2,7 @@
#define CCAN_LINT_H
#include "config.h"
#include <ccan/list/list.h>
#include <ccan/dgraph/dgraph.h>
#include <stdbool.h>
#include "../doc_extract.h"
#include "licenses.h"
......@@ -80,8 +81,6 @@ struct score {
};
struct ccanlint {
struct list_node list;
/* More concise unique name of test. */
const char *key;
......@@ -113,10 +112,10 @@ struct ccanlint {
const char *needs;
/* Internal use fields: */
/* Who depends on us? */
struct list_head dependencies;
/* How many things do we (still) depend on? */
unsigned int num_depends;
/* We are a node in a dependency graph. */
struct dgraph_node node;
/* Are we targeted? */
bool should_run;
/* Did we skip a dependency? If so, must skip this, too. */
const char *skip;
/* Did we fail a dependency? If so, skip and mark as fail. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment