Whole file
terryyin/lizard
The author described this change as “fix issue https://github.com/terryyin/lizard/issues/309”. It counts as a record because the check below fails on the code as it stood at 471ef1be1 and passes on 4891f1164, with nothing else changed between the two runs.
Projectterryyin/lizard
Fix saved2021-01-29
Sharing licenceMIT · LICENSE.txt
Change size+7 −0
What the code was meant to do, written into the code itself as a save note
fix issue https://github.com/terryyin/lizard/issues/309
The change
| 205 | 205 | self.context.add_to_long_function_name(" " + token) | |
| 206 | 206 | elif token == 'throw': | |
| 207 | 207 | self._state = self._state_throw | |
| 208 | + | elif token == 'throws': | |
| 209 | + | self._state = self._state_throws | |
| 208 | 210 | elif token == '->': | |
| 209 | 211 | self._state = self._state_trailing_return | |
| 210 | 212 | elif token == 'noexcept': | |
| ⋯ | |||
| 230 | 232 | @CodeStateMachine.read_inside_brackets_then("()") | |
| 231 | 233 | def _state_throw(self, _): | |
| 232 | 234 | self._state = self._state_dec_to_imp | |
| 235 | + | ||
| 236 | + | @CodeStateMachine.read_until_then(';{') | |
| 237 | + | def _state_throws(self, token, _): | |
| 238 | + | self._state = self._state_dec_to_imp | |
| 239 | + | self._state(token) | |
| 233 | 240 | ||
| 234 | 241 | def _state_noexcept(self, token): | |
| 235 | 242 | if token == '(': | |
The check that tells the two apart
fail→pass·test/test_languages/testJava.py::TestJava::test_abstract_function_without_body_with_throws_following_method
Check file test/test_languages/testJava.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 it471ef1be1ce1d5575d9866a2287ccce2910cc66c
Broken version dated2020-10-20
Modulelizard_languages.clike
Units changedCLikeStates
Fingerprint4efc166374237faa
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)