summaryrefslogtreecommitdiffstats
path: root/subprojects/libhandy/lint
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 14:36:24 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 14:36:24 +0000
commit9b6d8e63db85c30007b463e91f91a791969fa83f (patch)
tree0899af51d73c1bf986f73ae39a03c4436083018a /subprojects/libhandy/lint
parentInitial commit. (diff)
downloadgnome-control-center-9b6d8e63db85c30007b463e91f91a791969fa83f.tar.xz
gnome-control-center-9b6d8e63db85c30007b463e91f91a791969fa83f.zip
Adding upstream version 1:3.38.4.upstream/1%3.38.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'subprojects/libhandy/lint')
-rwxr-xr-xsubprojects/libhandy/lint/api-visibility.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/subprojects/libhandy/lint/api-visibility.sh b/subprojects/libhandy/lint/api-visibility.sh
new file mode 100755
index 0000000..ce8e7f5
--- /dev/null
+++ b/subprojects/libhandy/lint/api-visibility.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+# Check that private headers aren't included in public ones.
+if grep "include.*private.h" $(ls src/*.h | grep -v "private.h");
+then
+ echo "Private headers shouldn't be included in public ones."
+ exit 1
+fi
+
+# Check that handy.h contains all the public headers.
+for header in $(ls src | grep "\.h$" | grep -v "private.h" | grep -v handy.h);
+do
+ if ! grep -q "$(basename $header)" src/handy.h;
+ then
+ echo "The public header" $(basename $header) "should be included in handy.h."
+ exit 1
+ fi
+done