tools/check-includes.sh: test that c files include their .h files.

This is best-practice (to ensure prototypes match up), but there were a
few places we didn't (at least, directly).  Make it a requirement,
either of form "foo.h" or <dir/foo.h>.

The noise is the change to our print templates.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2021-09-16 14:20:02 +09:30
parent d970cc070e
commit 00a0d09340
47 changed files with 55 additions and 45 deletions

View File

@@ -1,5 +1,6 @@
#include <ccan/array_size/array_size.h>
#include <common/htlc.h>
#include <common/htlc_state.h>
#include "htlc_state_names_gen.h"
const char *htlc_state_name(enum htlc_state s)

View File

@@ -3,6 +3,7 @@
#include <ccan/array_size/array_size.h>
#include <ccan/cast/cast.h>
#include <common/ecdh.h>
#include <common/onion.h>
#include <common/sphinx.h>
#include <sodium/crypto_aead_chacha20poly1305.h>
#include <wire/onion_wire.h>

View File

@@ -80,4 +80,4 @@ bool fromwire_status_peer_error(const tal_t *ctx, const void *p, struct channel_
fromwire_u8_array(&cursor, &plen, *error_for_them, len);
return cursor != NULL;
}
// SHA256STAMP:a247441c5a012c0dcaab043780943604354ff5c4f360f83b87fcea94816eab8e
// SHA256STAMP:3e1d1ae6327232326b2a08f788c59485e0c4abd37bdb55604f111e087f605520

View File

@@ -34,4 +34,4 @@ bool fromwire_status_peer_error(const tal_t *ctx, const void *p, struct channel_
#endif /* LIGHTNING_COMMON_PEER_STATUS_WIREGEN_H */
// SHA256STAMP:a247441c5a012c0dcaab043780943604354ff5c4f360f83b87fcea94816eab8e
// SHA256STAMP:3e1d1ae6327232326b2a08f788c59485e0c4abd37bdb55604f111e087f605520

View File

@@ -1,6 +1,6 @@
#include "common/psbt_internal.h"
#include <bitcoin/script.h>
#include <ccan/ccan/tal/tal.h>
#include <common/psbt_internal.h>
#include <common/psbt_open.h>
#include <wally_psbt.h>
#include <wire/peer_wire.h>

View File

@@ -1,4 +1,4 @@
#include "common/psbt_open.h"
#include "config.h"
#include <assert.h>
#include <bitcoin/psbt.h>
#include <bitcoin/script.h>
@@ -6,6 +6,7 @@
#include <ccan/asort/asort.h>
#include <ccan/ccan/endian/endian.h>
#include <ccan/ccan/mem/mem.h>
#include <common/psbt_open.h>
#include <common/pseudorand.h>
#include <common/utils.h>

View File

@@ -214,4 +214,4 @@ bool fromwire_status_version(const tal_t *ctx, const void *p, wirestring **versi
*version = fromwire_wirestring(ctx, &cursor, &plen);
return cursor != NULL;
}
// SHA256STAMP:9a7b4598fad40c5df016c17464c3c8f7b067a17eb993cc65fea42486e3ffb3f7
// SHA256STAMP:83a462b28754c5b0c5a496b7e719f15ef6f6c1560f0eea12f76fa4b114189caa

View File

@@ -58,4 +58,4 @@ bool fromwire_status_version(const tal_t *ctx, const void *p, wirestring **versi
#endif /* LIGHTNING_COMMON_STATUS_WIREGEN_H */
// SHA256STAMP:9a7b4598fad40c5df016c17464c3c8f7b067a17eb993cc65fea42486e3ffb3f7
// SHA256STAMP:83a462b28754c5b0c5a496b7e719f15ef6f6c1560f0eea12f76fa4b114189caa