Whole file
terryyin/lizard
The author described this change as “fix(csv): emit columns for extensions with multiple FUNCTION_INFO fields”. It counts as a record because the checks below fail on the code as it stood at 0b97a9ae8 and pass on 2640089e8, with nothing else changed between the two runs.
Projectterryyin/lizard
Fix saved2026-07-02
Sharing licenceMIT · LICENSE.txt
Change size+3 −4
What the code was meant to do, written into the code itself as a save note
fix(csv): emit columns for extensions with multiple FUNCTION_INFO fields
The change
| 23 | 23 | extension_variables = [] | |
| 24 | 24 | extension_captions = [] | |
| 25 | 25 | for extension in options.extensions: | |
| 26 | - | if extension.__class__.__name__ == 'LizardExtension': | |
| 27 | - | if hasattr(extension, 'FUNCTION_INFO') and \ | |
| 28 | - | len(list(extension.FUNCTION_INFO)) == 1: | |
| 29 | - | extension_variable = list(extension.FUNCTION_INFO)[0] | |
| 26 | + | if extension.__class__.__name__ == 'LizardExtension' and \ | |
| 27 | + | hasattr(extension, 'FUNCTION_INFO'): | |
| 28 | + | for extension_variable in extension.FUNCTION_INFO: | |
| 30 | 29 | extension_variables.append(extension_variable) | |
| 31 | 30 | var_extension = extension.FUNCTION_INFO[extension_variable] | |
| 32 | 31 | extension_caption = var_extension['caption'] \ |
The check that tells the two apart
fail→pass·test/testOutputCSV.py::TestCSVOutput::test_csv_header_with_multi_field_extension
fail→pass·test/testOutputCSV.py::TestCSVOutput::test_csv_row_with_multi_field_extension
Check file test/testOutputCSV.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 it0b97a9ae8e77b8d559e7ef187ad4b4e3ef02924f
Broken version dated2026-06-15
Modulelizard_ext.csvoutput
Units changedcsv_output
Fingerprinta411e0bf297cd5f9
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-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)
- 2026-06-02fix(objc): handle nested parens in block / function-pointer param types