no files found from JSON Compilation Database on linux if project contains upper case file names#2691
Conversation
… case on linux convert files in JSON Compilation Database to lower case because unifyPath() converted file names to lower case
|
Hi @kragens, thanks for providing this. This issues seems to be related to #2700? Not sure if your fix works on all operating systems. Reading here https://github.com/SonarOpenCommunity/sonar-cxx/wiki/Troubleshooting-Reports#file-path-issues there are also case-sensitive operating systems where making all lower-case is not working?
Have to check this. Regards, |
| var inputFilesInConfig = squidConfig.getFiles(); | ||
| var result = StreamSupport.stream(inputFiles.spliterator(), false) | ||
| .filter(f -> inputFilesInConfig.contains(Path.of(f.uri()))) | ||
| .filter(f -> inputFilesInConfig.contains(Paths.get((Path.of(f.uri()).toString()).toLowerCase(Locale.getDefault())))) |
There was a problem hiding this comment.
Depending on the operating system and SonarQube Database settings paths can be case-sensitive (also on case-insensitive operating systems). Think making it always lowercase does not work?
|
Below the solution from the report sensors: |
|
Hello @kragens, thx for the hint will have a look to it and try to find out why all is converted to lowercase … |
- the notation of paths in the db can deviate from the notation in the file system. - restoring the spelling of paths from the file system - close SonarOpenCommunity#2691
|
solved with #2725 |
|
Hi @kragens , you can test it with |
|
Tested successfully in release v2.2.0. thanks for fixing it @guwirth |
convert files in JSON Compilation Database to lower case because unifyPath() converted file names to lower case
This change is