numaru / vscode-ceedling-test-adapter

Ceedling Test Adapter for the VS Code Test Explorer
MIT License
37 stars 14 forks source link

Remove error nodes on workspace folders which have no project.yml #25

Open numaru opened 5 years ago

numaru commented 5 years ago

Hi,

Sorry for reopening a closed ticket, but I don't understand how this was fixed. I have a workspace with three folders (my source code in /src, some docs in /doc and the tests in /test). I keep them separated so I can get different c_cpp_settings.json for source and for tests, for example. When I open the test explorer, I get two errors on the two workspaces that are not ceedling projects. How can I get rid of them?

image

I set the extension settings in the folder level, so only the test folder has the right path to the "project.yml" file (the other two have the default '.', and I think the extension is searching in /src and in /docs for a project.yml). As you said, it's better to get the error so the user can see that the problem comes from the extension is unable to get the settings, but maybe there should be a way to say "this folder doesn't contain one, that's why you can't find it, don't search".

Originally posted by @joel-felcana in https://github.com/numaru/vscode-ceedling-test-adapter/issues/9#issuecomment-508171950

numaru commented 5 years ago

A proper solution could be a ceedlingExplorer.hasProject boolean option to tell the extension to search or not for a ceedling project in this workspace/folder.

joel-felcana commented 5 years ago

That would be brilliant, thanks for considering my suggestion