If I run pio check
, I have an output like this:
src/main.cpp:10: [medium:warning] inclusion of deprecated C++ header 'stdlib.h'; consider using 'cstdlib' instead [hicpp-deprecated-headers,modernize-deprecated-headers]
src/main.cpp:16: [medium:warning] declaration must be declared within the '__llvm_libc' namespace [llvmlibc-implementation-in-namespace]
src/main.cpp:19: [medium:warning] declaration must be declared within the '__llvm_libc' namespace [llvmlibc-implementation-in-namespace]
whereas if I run clang-tidy src/main.cpp
I have an output like this:
/Users/ubaldot/.platformio/packages/toolchain-atmelavr/bin/../lib/gcc/avr/7.3.0/../../../../avr/include/stdlib.h:48:10: error: 'stddef.h' file not found [clang-diagnostic-error]
#include <stddef.h>
^~~~~~~~~~
/Users/ubaldot/Documents/arduino/freeRTOS/hello_world/src/main.cpp:10:10: warning: inclusion of deprecated C++ header 'stdlib.h'; consider using 'cstdlib' instead [modernize-deprecated-headers]
#include <stdlib.h>
^~~~~~~~~~
<cstdlib>
Are you aware of any flag to pass to clang-tidy
to get an output like the one from pio check
?