import soloud_codegen
import glob
import os
def checkfile(apifunc, fname):
if apifunc in open(fname).read():
return True
return False
def checkfiles(apifunc):
for file in glob.glob("../docsrc/*.mmd"):
if checkfile(apifunc, file):
return True
return False
print("Checking for undocumented APIs..")
print()
found = 0
total = 0
for func in soloud_codegen.soloud_func:
apifunc = func[1].replace("_",".")
if ((apifunc[-2::] != "Ex") and
(apifunc[-7::] != "destroy") and
(apifunc[-6::] != "create")):
total += 1
if not checkfiles(apifunc + "()"):
print(apifunc)
found += 1
if found == 0:
print("All good! (" + str(total) + ", not counting ctor/dtor/ex)")
else:
print()
print(str(found) + " / " + str(total) + " APIs undocumented. Get to work!")
print("(not counting ctor/dtor/ex variants)")