microsoft / sarif-vscode-extension

SARIF Microsoft Visual Studio Code extension
MIT License
110 stars 49 forks source link

"File names must match: " - case sensitive? #486

Open samyun opened 1 year ago

samyun commented 1 year ago

I have a sarif file that is unable to find the source code files that correspond to the result. When I manually selected the file in the file picker, it errored out, saying the file names must match. However, it appears to be doing a case sensitive search - "foo.cpp" and "Foo.cpp" (not the real file names).

https://github.com/microsoft/sarif-vscode-extension/blob/31f84d5b8f42f9af681d5607c5f9350367a5f6c8/src/extension/uriRebaser.ts

                if (partsOld.last !== partsNew.last) {
                    void window.showErrorMessage(`File names must match: "${partsOld.last}" and "${partsNew.last}"`);
                    return '';
                }

This seems like it should be doing a case insensitive comparison, perhaps?

This is on VS Code, Sarif Viewer extension version 3.3.3

bowerscd-corp commented 1 year ago

+1, Windows hasn't enforced case sensitivity of files for a very, very, long time. Probably needs to check the platform and determine case the platform's case sensitivity settings if this is intended to work x-plat.