add cppcheck

This commit is contained in:
proddy
2020-11-22 16:15:07 +01:00
parent fc189e13c3
commit f1080c6095
2 changed files with 9 additions and 2 deletions

1
.gitignore vendored
View File

@@ -23,3 +23,4 @@ firmware
/interface/build/ /interface/build/
/interface/node_modules/ /interface/node_modules/
.VSCodeCounter/ .VSCodeCounter/
cppcheck.out.xml

View File

@@ -21,6 +21,9 @@ SOURCES := src lib_standalone lib/uuid-common/src lib/uuid-console/src lib/uui
INCLUDES := lib/ArduinoJson/src lib_standalone lib/uuid-common/src lib/uuid-console/src lib/uuid-log/src lib/uuid-telnet/src lib/uuid-syslog/src src/devices src INCLUDES := lib/ArduinoJson/src lib_standalone lib/uuid-common/src lib/uuid-console/src lib/uuid-log/src lib/uuid-telnet/src lib/uuid-syslog/src src/devices src
LIBRARIES := LIBRARIES :=
CPPCHECK = cppcheck
CHECKFLAGS = -q
#---------------------------------------------------------------------- #----------------------------------------------------------------------
# Languages Standard # Languages Standard
#---------------------------------------------------------------------- #----------------------------------------------------------------------
@@ -110,7 +113,7 @@ COMPILE.cpp = $(CXX) $(CXX_STANDARD) $(CXXFLAGS) $(DEPFLAGS) -c $< -o $@
#---------------------------------------------------------------------- #----------------------------------------------------------------------
# Targets # Targets
#---------------------------------------------------------------------- #----------------------------------------------------------------------
all: $(OUTPUT) all: cppcheck.out.xml $(OUTPUT)
$(OUTPUT): $(OBJS) $(OUTPUT): $(OBJS)
@mkdir -p $(@D) @mkdir -p $(@D)
@@ -129,11 +132,14 @@ $(BUILD)/%.o: %.s
@mkdir -p $(@D) @mkdir -p $(@D)
$(COMPILE.s) $(COMPILE.s)
cppcheck.out.xml: $(SOURCES)
$(CPPCHECK) $(CHECKFLAGS) $^ --xml >$@
run: $(OUTPUT) run: $(OUTPUT)
@$< @$<
clean: clean:
@$(RM) -r $(BUILD) $(OUTPUT) @$(RM) -r $(BUILD) $(OUTPUT) cppcheck.out.xml
help: help:
@echo available targets: all run clean @echo available targets: all run clean