matth-x / MicroOcpp

OCPP 1.6 / 2.0.1 client for microcontrollers
MIT License
347 stars 149 forks source link

cppcheck fail (cppcheck --force src/MicroOcpp) #308

Closed mundel closed 5 months ago

mundel commented 5 months ago

src/MicroOcpp/Operations/GetConfiguration.cpp:138:13: error: There is an unknown macro here somewhere. Configuration is required. If MO_DBG_DEBUG is a macro then please configure it. [unknownMacro] MO_DBG_DEBUG("Unknown key: %s", key)

matth-x commented 5 months ago

Hi @mundel, thank you for the hint! I recently changed the debug macros and there could indeed be an issue with the new macros definition. I would like to reproduce this. How did you use cppcheck to find that error? Btw. I would be very open to adding cppcheck as a GitHub Action.

mundel commented 5 months ago

Hi @matth-x , As I mentioned in heading. Use below command to check:- cppcheck --force src/MicroOcpp

matth-x commented 5 months ago

Couldn't reproduce it here. The output for GetConfiguration (on main) is

Checking src/MicroOcpp/Operations/GetConfiguration.cpp ...
67/92 files checked 82% done

Any idea what I could be missing?

mundel commented 5 months ago

Hi @matth-x I was cross check and found with your latest patch this issue is not seen. I was not sync code from last couple of days.