Can not inspect code

Hello, I can’t check my code in inspect tab. How can I fix this error(I skipped some text in error, because there were memory dump)

Undefines:

Includes: -I/Users/michal/IT/Robots_of_education/Code/Robots/include/ -I/Users/michal/IT/Robots_of_education/Code/Robots/src/ -I/Users/michal/IT/Robots_of_education/Code/Robots/.pio/libdeps/unoR3/Dictionary/src/ -I/Users/michal/IT/Robots_of_education/Code/Robots/.pio/libdeps/unoR3/ArduinoJson/src/ -I/Users/michal/.platformio/packages/framework-arduino-avr/cores/arduino/ -I/Users/michal/.platformio/packages/framework-arduino-avr/variants/standard/ -I/Users/michal/.platformio/packages/framework-arduino-avr/libraries/EEPROM/src/ -I/Users/michal/.platformio/packages/framework-arduino-avr/libraries/HID/src/ -I/Users/michal/.platformio/packages/framework-arduino-avr/libraries/SPI/src/ -I/Users/michal/.platformio/packages/framework-arduino-avr/libraries/SoftwareSerial/src/ -I/Users/michal/.platformio/packages/framework-arduino-avr/libraries/Wire/src/ -I/Users/michal/.platformio/packages/toolchain-atmelavr/lib/gcc/avr/7.3.0/include/ -I/Users/michal/.platformio/packages/toolchain-atmelavr/lib/gcc/avr/7.3.0/include-fixed/ -I/Users/michal/.platformio/packages/toolchain-atmelavr/avr/include/ -I/Users/michal/.platformio/packages/tool-unity/

Platform:Unspecified

Error: Found a breaking defect ‘syntax error’ in /Users/michal/.platformio/packages/toolchain-atmelavr/avr/include/stdlib.h:162

Please note: check results might not be valid!

Try adding --skip-packages

“severity=error<&PIO&>message=syntax error<&PIO&>file=/Users/michal/.platformio/packages/toolchain-atmelavr/avr/include/stdlib.h<&PIO&>line=162<&PIO&>column=65<&PIO&>callstack=[/Users/michal/.platformio/packages/toolchain-atmelavr/avr/include/stdlib.h:162]<&PIO&>cwe=0<&PIO&>id=syntaxError”

Error: Found a breaking defect ‘syntax error’ in /Users/michal/.platformio/packages/toolchain-atmelavr/avr/include/stdlib.h:162

Please note: check results might not be valid!

Try adding --skip-packages

“severity=error<&PIO&>message=syntax error<&PIO&>file=/Users/michal/.platformio/packages/toolchain-atmelavr/avr/include/stdlib.h<&PIO&>line=162<&PIO&>column=65<&PIO&>callstack=[/Users/michal/.platformio/packages/toolchain-atmelavr/avr/include/stdlib.h:162]<&PIO&>cwe=0<&PIO&>id=syntaxError”

src/Message/Device.cpp:18: [low:style] The function ‘getPinsPtr’ is never used. [unusedFunction]

src/Message/Device.cpp:13: [low:style] The function ‘setPins’ is never used. [unusedFunction]

src/Message/Task.cpp:77: [low:style] Condition ‘extraValues=nullptr’ is always false [knownConditionTrueFalse]

src/Message/Task.cpp:42: [low:style] The function ‘getExtraValue’ is never used. [unusedFunction]

src/Message/Task.cpp:96: [low:style] The function ‘getExtraValuesSize’ is never used. [unusedFunction]

src/Message/Task.cpp:22: [low:style] The function ‘getTask’ is never used. [unusedFunction]

src/Message/Task.cpp:75: [low:style] The function ‘setExtraValue’ is never used. [unusedFunction]

src/Message/Task.cpp:115: [low:style] The function ‘setExtraValuesSize’ is never used. [unusedFunction]

src/Message/VMsgContainer.cpp:12: [low:style] The function ‘getDevType’ is never used. [unusedFunction]

src/Message/VMsgContainer.cpp:37: [low:style] The function ‘getID’ is never used. [unusedFunction]

src/Message/VMsgContainer.cpp:7: [low:style] The function ‘setDevType’ is never used. [unusedFunction]

src/Message/VMsgContainer.cpp:32: [low:style] The function ‘setID’ is never used. [unusedFunction]

Error: cppcheck failed to perform check! Please examine tool output in verbose mode.

Component HIGH MEDIUM LOW


src/Message 0 0 12

Total 0 0 12

========================= [FAILED] Took 12.15 seconds =========================

Environment Tool Status Duration


nanoNew cppcheck IGNORED

test_nanoNew cppcheck IGNORED

debug_nanoNew cppcheck IGNORED

unoR3 cppcheck FAILED 00:00:12.149

test_unoR3 cppcheck IGNORED

debug_unoR3 cppcheck IGNORED

native cppcheck IGNORED

==================== 1 failed, 0 succeeded in 00:00:12.149 ====================

As Expose `--skip-packages` option in GUI · Issue #217 · platformio/platformio-docs · GitHub says, set check_skip_packages = yes in the platformio.ini.

EDIT Corrected misspelling.

Thanks for help. It works :slight_smile:

I have one question more: how can I filter src files? It shows me errors from libraries:

Edit: clean shows putput: “Warning! Ignore unknown configuration option skip_check_packages in section [env:lolin32]”

I have the same problem. platformio.ini now reads:

[env:lolin32]
skip_check_packages = yes
platform = espressif32
board = lolin32
framework = arduino
upload_protocol = espota
upload_port = 192.168.178.166
monitor_speed = 115200
extra_scripts =
    pre:preBuild.py

have also tried to add it at the end, fails also.

If I call using the skip from command line it works. Sadly, the used libraries trigger too much errors, the window does not show even half of all founds^^.

@inso this is not skip_check_packages but check_skip_packages

That did the trick, thank you very much :smiley:

All I found is
https://docs.platformio.org/en/latest/projectconf/section_env_check.html#check-patterns
sadly it says lib is checked by default. Cannot see how to exclude…
(having the same problem with ~2500 defects within the libraries^^)