If I have a C++ function which uses the thousands seperator (introduced in C++14), then lizard will go looking for a matching single quote and will consider all lines from the ' in 100'000 until the next ' to be part of the same function.
This is a simple file that reproduces the problem:
#include <stdio.h>
int func() {
return 100'000;
}
// Line 1
// Line 2
// Line 3
// Line 4
// Line 5
void func2() {
printf("x = '%d'\n", 1234);
}
If I run lizard --length 10 then it incorrectly reports that func is longer than 10 lines:
If I have a C++ function which uses the thousands seperator (introduced in C++14), then lizard will go looking for a matching single quote and will consider all lines from the ' in 100'000 until the next ' to be part of the same function.
This is a simple file that reproduces the problem:
If I run
lizard --length 10
then it incorrectly reports that func is longer than 10 lines:(it considers func to be 13 lines long).
If I add a comment with a single quote in it at the end of line 2, then everything works as expected:
EDIT: Tweaked C code to compile clean.