which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension) SonarQube v10.6 (92116), Scanner 6.0.0.4432
how is SonarQube deployed: zip
what are you trying to achieve: scanning my project
I think we found a bug in sonarscanner: for some reason, in some of our code files there was a broken unicode character, � which was probably due to charset issues over multiple computers and versioning systems. sonarscanner logged that it did not like this character, which is fine. we then removed the � from the file to get rid of the warning from sonarscanner, which lead to sonarscanner no longer complaining, but sonarqube displaying more issues. we noted that all these new issues are below the line with the � in it, so we think that sonarscanner not only recognizes the � and logs this to the console, but also silently crashes/fails afterwards, and finds no more issues in the file with the broken unicode in it.
The lastest version of SonarScanner CLI is 6.2.1. Can you upgrade and see if this is still replicable?
And if it is, could you post a small reproducer file? Also (and I suppose this will be obvious with a reproducer, but I’m going to ask anyway) what language is this? And did you see any errors in the analysis logs?
Hi,
i can no longer reproduce the issue. The invalid character � is noted by sonarscanner with the following message:
10:29:21.056 WARN Invalid character encountered in file /home/gitlab-runner/builds/FUEENz7S/0/<redacted>/product/<redacted>/ems/canopen/can_sync.c at line 438 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'