in Sources/SwiftCodeSanKit/Core/DeclMetaTypes.swift [163:201]
func declWhitelisted(name: String, isMember: Bool, module: String?, parents: [String]?, path: String?) -> Bool {
if let module = module {
if let list = modules, list.contains(module) {
return true
}
if let list = modulesPrefix {
let moduleHasPrefix = !list.filter{module.hasPrefix($0)}.isEmpty
if moduleHasPrefix { return true }
}
if let list = modulesSuffix {
let moduleHasSuffix = !list.filter{module.hasSuffix($0)}.isEmpty
if moduleHasSuffix { return true }
}
}
if let parents = parents, let list = inheritedTypes {
let inParentsList = !list.filter{ parents.contains($0) }.isEmpty
if inParentsList { return true }
}
if isMember {
if let list = members, list.contains(name) { return true }
} else {
if let list = decls, list.contains(name) { return true }
if let list = declsPrefix {
let declHasPrefix = !list.filter { name.hasPrefix($0) }.isEmpty
if declHasPrefix { return true }
}
if let list = declsSuffix {
let declHasSuffix = !list.filter { name.hasSuffix($0) }.isEmpty
if declHasSuffix { return true }
}
}
return false
}