chore: make lint job check for warnings
ci/woodpecker/pr/test Pipeline was successful Details
ci/woodpecker/pr/test-mem Pipeline failed Details
ci/woodpecker/pr/lint Pipeline failed Details

pull/4/head
Jef Roosens 2023-01-22 12:46:09 +01:00
parent d11d074960
commit 0c673a2751
2 changed files with 5 additions and 4 deletions

View File

@ -11,5 +11,6 @@ pipeline:
pull: true pull: true
commands: commands:
- make lint - make lint
- make CFLAGS='-Werror'
when: when:
event: [push, pull_request] event: [push, pull_request]

View File

@ -25,8 +25,8 @@ INC_FLAGS := $(addprefix -I,$(INC_DIRS))
# object file is also recompiled if only a header is changed. # object file is also recompiled if only a header is changed.
# -MP: generate a dummy target for every header file (according to the docs it # -MP: generate a dummy target for every header file (according to the docs it
# prevents some errors when removing header files) # prevents some errors when removing header files)
CFLAGS ?= -MMD -MP -Wall -Wextra CFLAGS ?= -MMD -MP
CFLAGS += $(INC_FLAGS) VIETERCFLAGS := $(INC_FLAGS) $(CFLAGS) -Wall -Wextra
.PHONY: all .PHONY: all
all: vieter all: vieter
@ -40,7 +40,7 @@ $(BUILD_DIR)/$(LIB_FILENAME): $(OBJS)
$(BUILD_DIR)/$(SRC_DIR)/%.c.o: $(SRC_DIR)/%.c $(BUILD_DIR)/$(SRC_DIR)/%.c.o: $(SRC_DIR)/%.c
mkdir -p $(dir $@) mkdir -p $(dir $@)
$(CC) $(CFLAGS) -c $< -o $@ $(CC) $(VIETERCFLAGS) -c $< -o $@
# =====TESTING===== # =====TESTING=====
@ -67,7 +67,7 @@ $(BINS_TEST): %: %.c.o $(OBJS)
# exposed. # exposed.
$(BUILD_DIR)/$(TEST_DIR)/%.c.o: $(TEST_DIR)/%.c $(BUILD_DIR)/$(TEST_DIR)/%.c.o: $(TEST_DIR)/%.c
mkdir -p $(dir $@) mkdir -p $(dir $@)
$(CC) $(CFLAGS) -I$(TEST_DIR) \ $(CC) $(VIETERCFLAGS) -I$(TEST_DIR) \
-I$(dir $(@:$(BUILD_DIR)/$(TEST_DIR)/%=$(SRC_DIR)/%)) \ -I$(dir $(@:$(BUILD_DIR)/$(TEST_DIR)/%=$(SRC_DIR)/%)) \
-c $< -o $@ -c $< -o $@