Rev
d53898 fixes a buglet caught by Félix.
Me:
>> Good catch in contractNodeOrGoToParent. Did typescript help?
Félix: > Not even! (my typescript linting settings are not tight enough to flag that comparison it seems)
> I
guess i have a good eye when scrutinizing/staring at code, the trick is
to shut down your inner dialog and let your instincts alert you on
something looking fishy. (easier said than done)"
Amazing! Yesterday I wrote @button find-non-calls, a script to find such mistakes. A flattened version is attached. The first pass (scan) finds defs in leo/core and leo/commands. The second pass (check) looks for the function names not followed by a parenthesis.
Alas, there are too many overlaps between function names and variables. These overlaps create too many false positives. I first created a (long!) list of exceptions. Then I had the not-too-bright idea to suppress hits in various contexts. But Doh, function calls are valid in those contexts, so check will discard almost all warnings about possible errors.
Summary
The script was always intended as a quick prototype. Alas, finding errors such as Félix found requires more sophisticated analysis of context.
At best, this script was a warmup for future work on pylint.
Edward