Whole file
terryyin/lizard
The author described this change as “fix: Function nesting”. It counts as a record because the check below fails on the code as it stood at 9bd29705f and passes on 42bb5335c, with nothing else changed between the two runs.
Projectterryyin/lizard
Fix saved2025-09-05
Sharing licenceMIT · LICENSE.txt
Change size+1 −1
What the code was meant to do, written into the code itself as a save note
fix: Function nesting
The change
| 112 | 112 | def _state_global(self, token): | |
| 113 | 113 | token_upper = token.upper() | |
| 114 | 114 | ||
| 115 | - | if token_upper in StReader._functions: | |
| 115 | + | if token_upper in StReader._functions and self.context.current_function.top_nesting_level < 0: | |
| 116 | 116 | self._state = self._function_name | |
| 117 | 117 | elif token_upper in StReader._blocks: | |
| 118 | 118 | self.context.add_bare_nesting() |
The check that tells the two apart
fail→pass·test/test_languages/testSt.py::Test_st_lizard::test_nested_actions
Check file test/test_languages/testSt.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before it9bd29705f945e25c65f7a8da0f03288f0bd36444
Broken version dated2025-09-05
Modulelizard_languages.st
Units changedStStates
Fingerprinte329345ab6bd4702
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.
Other bugs found in terryyin/lizard
- 2026-08-08fix(java): do not report control structures as methods
- 2026-07-02HalsteadClassifier
- 2026-07-02fix(csv): emit columns for extensions with multiple FUNCTION_INFO fields
- 2026-06-15fix(golike): register generic functions with [...] type params
- 2026-06-15fix(java): enhance parsing of generic and qualified type names in anonymous classes
- 2026-06-11fix(script): stop a '#' comment continuing past a trailing backslash (#317)