In idle-check.py line 166, the code catches only JSONDecodeError and KeyError.
If a line is valid JSON but is not an object (for example [] or "x"), obj.get raises AttributeError. This error goes out of the loop, and the full scan gives SCAN_ERROR.
Fix: skip lines that are not a dict (if not isinstance(obj, dict): continue), or also catch AttributeError.
Found by a static read of the code at commit 1f66a8f. The code was not run.
In
idle-check.pyline 166, the code catches onlyJSONDecodeErrorandKeyError.If a line is valid JSON but is not an object (for example
[]or"x"),obj.getraisesAttributeError. This error goes out of the loop, and the full scan givesSCAN_ERROR.Fix: skip lines that are not a dict (
if not isinstance(obj, dict): continue), or also catchAttributeError.Found by a static read of the code at commit
1f66a8f. The code was not run.