Yes, instead of excluding .pio directory, it check the content of .pio directory.
.pio/libdeps/desktop/ArduinoFake/src/arduino/Stream.h:64: [medium:warning] Member variable ‘Stream::startMillis’ is not initialized in the constructor. [uninitMemberVar]
.pio/libdeps/desktop/ArduinoFake/src/arduino/USBAPI.h:89: [medium:warning] Member variable 'Serial::rx_buffer_head’ is not initialized in the constructor. [uninitMemberVar]
.pio/libdeps/desktop/ArduinoFake/src/arduino/USBAPI.h:89: [medium:warning] Member variable 'Serial::rx_buffer_tail’ is not initialized in the constructor. [uninitMemberVar]
.pio/libdeps/desktop/ArduinoFake/src/arduino/USBAPI.h:89: [medium:warning] Member variable 'Serial::_rx_buffer’ is not initialized in the constructor. [uninitMemberVar]
.pio/libdeps/desktop/ArduinoFake/src/fakeit/fakeit.hpp:7533: [medium:warning] Class ‘Implementation’ does not have a copy constructor which is recommended since it has dynamic memory/resource allocation(s). [noCopyConstructor]
.pio/libdeps/desktop/ArduinoFake/src/fakeit/fakeit.hpp:7533: [medium:warning] Class ‘Implementation’ does not have a operator= which is recommended since it has dynamic memory/resource allocation(s). [noOperatorEq]
.pio/libdeps/desktop/ArduinoFake/src/fakeit/fakeit.hpp:8313: [medium:warning] Value of pointer ‘reference’, which points to allocated memory, is copied in copy constructor instead of allocating new memory. [copyCtorPointerCopying]
Error: Failed to execute check command! Exited with code -6.
Error: cppcheck failed to perform check! Please examine tool output in verbose mode.
========================================================================== [FAILED] Took 22.30 seconds ==========================================================================
But still it’s doing cppcheck on all external libraries in .pio/libdeps
I don’t want it to run cppcheck on others people code but rather focus on my own code.
Example of output because I use ArduionoJson…
.pio\libdeps\MCU4M-LOCAL\ArduinoJson\src\ArduinoJson\Document\JsonDocument.hpp:312: [low:performance] Function parameter 'pool' should be passed by const reference. [passedByValue]
.pio\libdeps\MCU4M-LOCAL\ArduinoJson\src\ArduinoJson\Document\JsonDocument.hpp:322: [low:performance] Function parameter 'pool' should be passed by const reference. [passedByValue]
.pio\libdeps\MCU4M-LOCAL\ArduinoJson\src\ArduinoJson\Strings\Adapters\RamString.hpp:116: [low:style] Parameter 's' can be declared as const array [constParameter]
.pio\libdeps\MCU4M-LOCAL\ArduinoJson\src\ArduinoJson\Variant\VariantSlot.hpp:62: [low:style] Parameter 'slot' can be declared as pointer to const [constParameterPointer]
.pio\libdeps\MCU4M-LOCAL\ArduinoJson\src\ArduinoJson\Variant\VariantSlot.hpp:70: [low:style] Parameter 'slot' can be declared as pointer to const [constParameterPointer]
.pio\libdeps\MCU4M-LOCAL\ArduinoJson\src\ArduinoJson\Memory\MemoryPool.hpp:116: [low:style] Parameter 'p' can be declared as pointer to const [constParameterPointer]