Fail closed on git status and walk deep forms without recursion.

Status records are NUL-terminated, and a git failure returns git's status. .test.cts and .spec.cts are tests. Help lists every skipped directory.
This commit is contained in:
Robert C. Martin
2026-10-03 17:48:35 -05:00
parent c726bf0158
commit 2be6acadf5
8 changed files with 603 additions and 272 deletions
+11
View File
@@ -599,3 +599,14 @@ def test_keep_uses_the_line_and_node_minimums():
assert _keep(_entry("a.py", 1, 4, {"q"}, nodes=20), 4, 20) is True
assert _keep(_entry("a.py", 1, 3, {"q"}, nodes=20), 4, 20) is False
assert _keep(_entry("a.py", 1, 4, {"q"}, nodes=19), 4, 20) is False
def test_a_deep_expression_is_read():
expr = " + ".join(["1"] * 1200)
entries, warning = entries_in_source("python", f"def place():\n return {expr}\n", "app.py", "app.py")
assert warning is None
assert entries
nested = "(inc " * 1200 + "x" + ")" * 1200
entries, warning = entries_in_source("clojure", f"(defn place [] {nested})\n", "app.clj", "app.clj")
assert warning is None
assert entries