Hello everybody,
I recently moved from Mint to Manjaro, I’m running PlatformIO as VSCode plugin, I can compile, upload and manage my projects just fine but clangtidy checks is not working, it was working on Mint, I don’t know if the problem is Manjaro (that uses newer Clang and newer libraries, if it does matter…) or an update to PlatformIO that broke it.
VS Code version:
Version: 1.45.0
Commit: d69a79b73808559a91206d73d7717ff5f798f23c
Date: 2020-05-07T16:10:24.511Z
Electron: 7.2.4
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
Operating system: Linux x64 5.6.11-1-MANJARO
PlatformIO version:
PlatformIO, version 4.3.3
System clang version:
clang version 10.0.0
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
platformio.ini (checks part only):
check_tool = clangtidy
check_flags =
clangtidy: -std=c++17 --checks=*
check_severity = low, medium, high
pio check --verbose command output (I trimmed some of the huge output)t:
Checking release > clangtidy (platform: https://github.com/platformio/platform-atmelavr.git; framework: arduino; board: controllino_maxi)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/home/labo/.platformio/packages/tool-clangtidy/clang-tidy --quiet -std=c++17 --checks=* /home/labo/Documenti/git-repos/lsh-arduino/src/device.cpp *TRIMMED: OTHER FILES* -- -DPLATFORMIO=40303 *TRIMMED: OTHER DFLAGS* --extra-arg=@"/tmp/tmphaqjzmwi"
LLVM ERROR: CommonOptionsParser: failed to parse command-line arguments. [CommonOptionsParser]: error: unsupported option '--extra-arg=@"/tmp/tmphaqjzmwi"'
Error: clangtidy failed to perform check! Please examine tool output in verbose mode.
============================================================================= [FAILED] Took 0.01 seconds =============================================================================
Environment Tool Status Duration
------------- --------- -------- ------------
release clangtidy FAILED 00:00:00.015
debug clangtidy IGNORED
======================================================================= 1 failed, 0 succeeded in 00:00:00.015 =======================================================================
The problem is --extra-arg=@"/tmp/tmphaqjzmwi"
since:
- That file does not exist, I double checked, but since it’s on tmp it’s maybe destroied when the command exits, I don’t know.
- It’s not a correct argument for clang-tidy
How can I solve my problem?