CLion code insight don't work inside ./test folder
See original GitHub issue- [*] PlatformIO Core. If you’ve found a bug, please provide an information below.
Configuration
Operating system: Pop!_OS 20.04
PlatformIO Version (platformio --version
): PlatformIO, version 4.4.0a4
Description of problem
CLion doesn’t think that .cpp files inside the ./test folder are part of the project, noting “This file does not belong to any project target, code insight features might not work properly”.
Steps to Reproduce
git clone https://github.com/platformio/platformio-examples
- Open
platformio-examples/unit-testing/wiring-blink
in CLion and allow it to create CMakeLists.txt and wait for the automatically startedpio init
command to finish - Open ./test/test_main.cpp and note the error highlighting on all
#include
s
Actual Results
Using #include
leads to import errors (only in CLion, project compiles and tests fine with pio
CLI tool).
Expected Results
Syntax highlighting works as expected without having red underscores on all #include
s and most function calls.
Additional info
System information (uname -a
): Linux pop-os 5.4.0-7634-generic #38~1592497129~20.04~9a1ea2e-Ubuntu SMP Fri Jun 19 22:43:37 UTC x86_64 x86_64 x86_64 GNU/Linux
CLion version: CLion 2020.2 EAP, Build #CL-202.6109.21
PlatformIO CLion plugin version: 202.6109.21
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:6 (1 by maintainers)
I created a new file CMakeListUser.txt with this content
and now Clion is happy.
Thanks! Fixed in https://github.com/platformio/platformio-core/commit/ed336525343f3825e748349254afff35c3569f59