I took a closer look at the related code. It seems such issue could happen if a file gets modified during the scan, or perhaps if a file’s encoding leads to incorrect counting of lines. Does this ring any bells with you? In particular:
- Are you sure the content of the directory doesn’t change during an analysis?
- Does the error happen always to the same files? (You may need to enable debug logs with
-X
to see the affected files.) - Would you be able to provide a minimal example that reproduces the problem? (For example, ideally, a project with a single file.)