[retro-gtk/header-fixes: 1/2] ci: Check that private headers remain private



commit 0157a0fda09b174de00ec092eb9522ec613c78f6
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Sat Jan 11 15:41:32 2020 +0100

    ci: Check that private headers remain private
    
    This will check we don't accidentally add private headers to public
    ones, exposing their API publicly.

 .gitlab-ci.yml | 10 ++++++++++
 1 file changed, 10 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4462fbc..f1e9471 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,8 +1,18 @@
 stages:
+  - lint
   - build
   - test
   - review
 
+api-visibility:
+  stage: lint
+  script:
+    - if grep "include.*private.h" $(ls retro-gtk/*.h | grep -v private);
+      then \
+        echo "Private headers shouldn't be included in public ones.";
+        exit 1;
+      fi
+
 variables:
   BUNDLE: "retro-demo-samples-test-git.flatpak"
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]