Whole file

terryyin/lizard

The author described this change as fix: Do not count `void` as a parameter (C/C++). It counts as a record because the check below fails on the code as it stood at 3c4488aed and passes on 9cff977ef, with nothing else changed between the two runs.

Fix saved2023-03-17
Sharing licenceMIT · LICENSE.txt
Change size+2 1

What the code was meant to do, written into the code itself as a save note

fix: Do not count `void` as a parameter (C/C++)

The change

196196 else:
197197 self.next(self._state_global)
198198 elif len(self.bracket_stack) == 1:
199- self.context.parameter(token)
199+ if token != 'void': # void is a reserved keyword, meaning no parameters
200+ self.context.parameter(token)
200201 return
201202 self.context.add_to_long_function_name(token)
202203

The check that tells the two apart

failpass·test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_function_with_no_param_void

Check file test/test_languages/testCAndCPP.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 it3c4488aed0e5b737486b5ff30b91f2747f904250
Broken version dated2023-02-27
Modulelizard_languages.clike
Units changedCLikeStates
Fingerprint87aa5de7a4308814
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