mirror of
https://github.com/github/codeql.git
synced 2025-12-18 01:33:15 +01:00
It turns out the threshold of 5 lines for stub modification detection was too strict: in case of a long class name the QL formatter will put the closing brace of the empty class definition on a new line, leading to codegen fail with an error thinking the stub was modified. On the other side of things, also adding a base to a stub class was not being detected as a modification. Now the modification test is slightly smarter. If the stub still marked as generated and * has more than 6 lines, or * the contents does not match a regexp aproximation of a plain stub then codegen will abort. The test will still avoid reading the whole contents of all the stubs.