]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
clang-tidy: Skip public headers
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 23 May 2025 11:03:57 +0000 (13:03 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Sat, 24 May 2025 18:57:05 +0000 (20:57 +0200)
We're very limited in our ability to change these due to backwards
compat, so let's skip them from analysis since we won't be able to
fix the errors anyway.

meson.build

index 4618520bcae82dbf8c471cc86cc7616ca9f360ff..c1cdfb2c8ee8a1a18eb5cae0903e7380b7afe992 100644 (file)
@@ -2841,6 +2841,10 @@ alias_target('gensources', generated_sources)
 clang_tidy = find_program('clang-tidy', required : false)
 if meson.version().version_compare('>=1.4.0')
         foreach source : sources
+                if systemd_headers.contains(source)
+                        continue
+                endif
+
                 if not source.full_path().endswith('.c') and not source.full_path().endswith('.h')
                         continue
                 endif
@@ -2848,7 +2852,7 @@ if meson.version().version_compare('>=1.4.0')
                 inputs = [source]
 
                 header = source.full_path().replace('.c', '.h')
-                if fs.exists(header) and header != source.full_path()
+                if fs.exists(header) and header != source.full_path() and header != libudev_h_path
                         inputs += header
                 endif