chore: make lint job check for warnings

min-heap
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
commands:
- make lint
- make CFLAGS='-Werror'
when:
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.
# -MP: generate a dummy target for every header file (according to the docs it
# prevents some errors when removing header files)
CFLAGS ?= -MMD -MP -Wall -Wextra
CFLAGS += $(INC_FLAGS)
CFLAGS ?= -MMD -MP
VIETERCFLAGS := $(INC_FLAGS) $(CFLAGS) -Wall -Wextra
.PHONY: all
all: vieter
@ -40,7 +40,7 @@ $(BUILD_DIR)/$(LIB_FILENAME): $(OBJS)
$(BUILD_DIR)/$(SRC_DIR)/%.c.o: $(SRC_DIR)/%.c
mkdir -p $(dir $@)
$(CC) $(CFLAGS) -c $< -o $@
$(CC) $(VIETERCFLAGS) -c $< -o $@
# =====TESTING=====
@ -67,7 +67,7 @@ $(BINS_TEST): %: %.c.o $(OBJS)
# exposed.
$(BUILD_DIR)/$(TEST_DIR)/%.c.o: $(TEST_DIR)/%.c
mkdir -p $(dir $@)
$(CC) $(CFLAGS) -I$(TEST_DIR) \
$(CC) $(VIETERCFLAGS) -I$(TEST_DIR) \
-I$(dir $(@:$(BUILD_DIR)/$(TEST_DIR)/%=$(SRC_DIR)/%)) \
-c $< -o $@