I’m using Sonarqube 7.6, and when scanning a JSX file, the render function has more lines of code than the file itself. Does anyone know why this is happening? Does SQ skip import statements and whitespace when calculating file size but does something different when calculating function loc?
Your version is well past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:
7.6 → 7.9.6 → 8.9.10 → 9.8 (last step optional)
(Note that the release of a new LTS, 9.9, is expected on 7 Feb 2023.)
If your error persists after upgrade, please come back to us.