Intellisense configuration provider 'nordic-semiconductor.nrf-connect' does not provide completions for unit test projects

Completions for symbols in unity.h and custom, common include files (e.g. test_main.h) are not found by intellisense.

c_cpp_properties.json:

{
    "configurations": [
        {
            "name": "Win32",
            "includePath": [
                "${workspaceFolder}/**"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "windowsSdkVersion": "10.0.19041.0",
            "compilerPath": "cl.exe",
            "cStandard": "c17",
            "cppStandard": "c++17",
            "intelliSenseMode": "windows-msvc-x64",
            "configurationProvider": "nordic-semiconductor.nrf-connect"
        }
    ],
    "version": 4
}

Tried and didn't work:

  • adding the test project as a separate application
  • adding ${workspaceFolder}/test/inc (location of test_main.h) to includePath or browse.path
  • searched for location of unity.h in SDK and toolchain folders came up with no results. Is it a generated file?

    1258.test.zip

Test project attached ^

Parents Reply Children
  • Hi,

    The linked resources did not resolve my issue. I am able to build and execute tests successfully. The problem is that the unity.h header, and custom includes in the test files are not recognized by the intellisense provider

    I've tried adding test/cmock/vendor/unity/src to my includePath, but that did not work either.

    In attached sample project (unity-include-errors.zip), observe that in test_mod1.c and test_mod2.c the unity.h and test_main.h includes are not processed correctly by the intellisense provider

    unity-include-errors.zip

Related