Reorganize like upstream: library at root (docking/dragdrop/debug tools merged into imgui.lua, tabs into imgui_widgets.lua), single imgui_demo.lua, backends/, fonts/, examples/, docs/; --no-demo build

This commit is contained in:
4DBug
2026-10-08 16:47:42 -05:00
parent 7c2a37a5d5
commit 8421bb5475
41 changed files with 19109 additions and 55555 deletions
+6 -4
View File
@@ -1,14 +1,16 @@
#!/usr/bin/env python3
"""Static check: ImGui.X / ImGui:X / global ImFoo() calls in imgui/*.lua that nothing defines.
"""Static check: ImGui.X / ImGui:X / global ImFoo() calls in the library *.lua files that nothing defines.
python3 tools/test/undefined.py
"""
import os, re, collections
ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
SRC = os.path.join(ROOT, "imgui")
SRC = ROOT # library *.lua at the root + backends/ (--no-demo: leave imgui_demo.lua out to check the library never needs it)
import sys
NO_DEMO = "--no-demo" in sys.argv
files = {}
for dp, _, fn in os.walk(SRC):
for dp, fn in ((ROOT, os.listdir(ROOT)), (os.path.join(ROOT, "backends"), os.listdir(os.path.join(ROOT, "backends")))):
for f in fn:
if f.endswith(".lua"):
if f.endswith(".lua") and not (NO_DEMO and f == "imgui_demo.lua"):
files[os.path.relpath(os.path.join(dp, f), SRC)] = open(os.path.join(dp, f)).read()
def strip(s): # drop comments and strings (roughly) so we don't report text