From 0773e779bee325d364997ff7ec2ef8ec45c474c1 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 14 Oct 2022 13:38:35 -0400 Subject: Add stricter test for warnings in public headers --- test/headers/.clang-tidy | 11 +++++++++++ test/headers/test_headers.c | 24 ++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 test/headers/.clang-tidy create mode 100644 test/headers/test_headers.c (limited to 'test') diff --git a/test/headers/.clang-tidy b/test/headers/.clang-tidy new file mode 100644 index 0000000..7c6ab44 --- /dev/null +++ b/test/headers/.clang-tidy @@ -0,0 +1,11 @@ +# Copyright 2022 David Robillard +# SPDX-License-Identifier: CC0-1.0 OR ISC + +Checks: > + *, + -altera-*, + -llvmlibc-*, + -readability-identifier-length, +WarningsAsErrors: '*' +HeaderFilterRegex: '.*' +FormatStyle: file diff --git a/test/headers/test_headers.c b/test/headers/test_headers.c new file mode 100644 index 0000000..43c5482 --- /dev/null +++ b/test/headers/test_headers.c @@ -0,0 +1,24 @@ +// Copyright 2022 David Robillard +// SPDX-License-Identifier: ISC + +#include "zix/allocator.h" // IWYU pragma: keep +#include "zix/attributes.h" // IWYU pragma: keep +#include "zix/bitset.h" // IWYU pragma: keep +#include "zix/btree.h" // IWYU pragma: keep +#include "zix/bump_allocator.h" // IWYU pragma: keep +#include "zix/common.h" // IWYU pragma: keep +#include "zix/digest.h" // IWYU pragma: keep +#include "zix/hash.h" // IWYU pragma: keep +#include "zix/ring.h" // IWYU pragma: keep +#include "zix/sem.h" // IWYU pragma: keep +#include "zix/thread.h" // IWYU pragma: keep +#include "zix/tree.h" // IWYU pragma: keep + +#if defined(__GNUC__) +__attribute__((const)) +#endif +int +main(void) +{ + return 0; +} -- cgit v1.2.1