From 7db2f20f44023826f42743d047dc6213e6db7b87 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dennis=20Gl=C3=A4ser?= <dennis.glaeser@iws.uni-stuttgart.de>
Date: Thu, 2 Sep 2021 13:11:09 +0200
Subject: [PATCH] [bin][common] make header filter affirmative

---
 bin/util/common.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/bin/util/common.py b/bin/util/common.py
index 335a776d05..62af82d281 100644
--- a/bin/util/common.py
+++ b/bin/util/common.py
@@ -198,9 +198,9 @@ def queryYesNo(question, default="yes"):
 def cppHeaderFilter():
     """
     Filter out source files that are not headers
-    (sources are determined by looking for config.h)
+    (consider everything except for config.h)
     """
-    return lambda fileName: fileName == "config.h"
+    return lambda fileName: fileName != "config.h"
 
 
 def includedCppProjectHeaders(file, projectBase, headers=None, headerFilter=cppHeaderFilter()):
@@ -219,7 +219,7 @@ def includedCppProjectHeaders(file, projectBase, headers=None, headerFilter=cppH
         def process(pathInProject):
             headerPath = os.path.join(projectBase, pathInProject)
             if os.path.exists(headerPath):
-                if not headerFilter(pathInProject):
+                if headerFilter(pathInProject):
                     if headerPath not in headers:
                         headers.append(headerPath)
                         includedCppProjectHeaders(headerPath, projectBase, headers, headerFilter)
-- 
GitLab