meson: Rework clang-tidy integration to be done via unit tests
Instead of using run-clang-tidy.py with its own scheduling, let's just gather a list of source files ourselves and then use that to add a unit test for each source file that runs clang-tidy on the source file. We also add a bit of logic to run clang-tidy on most header files as well for extra coverage. This uncovered various header files that were not standalone so this commit also includes fixes to make sure the clang-tidy tests are all green. We can also use this in a later commit to run clang-include-cleaner on each source file in the same way.
This commit is contained in:
@@ -118,6 +118,8 @@ basic_sources = files(
|
||||
'xattr-util.c',
|
||||
)
|
||||
|
||||
sources += basic_sources
|
||||
|
||||
missing_audit_h = files('missing_audit.h')
|
||||
missing_socket_h = files('missing_socket.h')
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <sys/resource.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "macro.h"
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdbool.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "errno-list.h"
|
||||
|
||||
Reference in New Issue
Block a user