chore: integrate cppcheck into workflow
This commit is contained in:
parent
b053aa6c93
commit
6af3e6ad6d
17 changed files with 64 additions and 69 deletions
20
Makefile
20
Makefile
|
|
@ -43,7 +43,6 @@ libtrie:
|
|||
liblsm:
|
||||
$(MAKE) -C lsm
|
||||
|
||||
.PHONY: $(BIN)
|
||||
$(BIN): libtrie liblsm $(OBJS)
|
||||
$(CC) -o $@ $(OBJS) $(_LDFLAGS)
|
||||
|
||||
|
|
@ -55,6 +54,12 @@ $(BUILD_DIR)/$(THIRDPARTY_DIR)/%.c.o: $(THIRDPARTY_DIR)/%.c
|
|||
mkdir -p $(dir $@)
|
||||
$(CC) $(_CFLAGS) -c $< -o $@
|
||||
|
||||
.PHONY: bin-docker
|
||||
bin-docker:
|
||||
docker build -t lander .
|
||||
docker container create --name lander-temp lander
|
||||
docker cp -q lander-temp:/bin/lander $(BUILD_DIR)/lander-docker
|
||||
docker container rm lander-temp
|
||||
|
||||
# =====TESTING=====
|
||||
.PHONY: run
|
||||
|
|
@ -110,6 +115,19 @@ lint:
|
|||
fmt:
|
||||
clang-format -i $(SRCS) $(SRCS_H) $(SRCS_H_INTERNAL)
|
||||
|
||||
.PHONY: check
|
||||
check:
|
||||
mkdir -p $(BUILD_DIR)/cppcheck
|
||||
cppcheck \
|
||||
$(addprefix -I,$(INC_DIRS)) \
|
||||
--cppcheck-build-dir=$(BUILD_DIR)/cppcheck \
|
||||
--project=compile_commands.json \
|
||||
--error-exitcode=1 \
|
||||
--enable=warning,style \
|
||||
-ithirdparty/* \
|
||||
-itrie/* \
|
||||
--quiet
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf $(BUILD_DIR)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue