Skip to content
Snippets Groups Projects
Commit 7db2f20f authored by Dennis Gläser's avatar Dennis Gläser
Browse files

[bin][common] make header filter affirmative

parent a28aefef
No related branches found
No related tags found
1 merge request!2816Feature/bin common affirmative filter
Pipeline #8227 passed
+2
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment