From cc9dcb3058f7e16e74c0cb1938aa634df34810a1 Mon Sep 17 00:00:00 2001 From: Chewing_Bever Date: Wed, 2 Nov 2022 18:25:49 +0100 Subject: [PATCH] fix(ci): install dependencies when linting --- .gitignore | 1 + .woodpecker/lint.yml | 13 ++++++++++++- Makefile | 4 ++-- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index a2804fe..aaec9ef 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,7 @@ gdb.txt # Generated docs _docs/ +docs/resources/_gen/ /man/ # VLS logs diff --git a/.woodpecker/lint.yml b/.woodpecker/lint.yml index f87c06f..ec64d13 100644 --- a/.woodpecker/lint.yml +++ b/.woodpecker/lint.yml @@ -7,10 +7,21 @@ branches: platform: 'linux/amd64' pipeline: + # vfmt seems to get confused if these aren't present + install-modules: + image: *vlang_image + pull: true + commands: + - export VMODULES=$PWD/.vmodules + - 'cd src && v install' + when: + event: [pull_request] + lint: image: *vlang_image pull: true commands: + - export VMODULES=$PWD/.vmodules - make lint when: - event: [ pull_request ] + event: [pull_request] diff --git a/Makefile b/Makefile index 332f70d..e716807 100644 --- a/Makefile +++ b/Makefile @@ -92,9 +92,9 @@ clean: .PHONY: autofree autofree: afvieter afvieter: $(SOURCES) - $(V_PATH) -showcc -autofree -o afvieter $(SRC_DIR) + $(V) -showcc -autofree -o afvieter $(SRC_DIR) .PHONY: skip-unused skip-unused: suvieter suvieter: $(SOURCES) - $(V_PATH) -showcc -skip-unused -o suvieter $(SRC_DIR) + $(V) -skip-unused -o suvieter $(SRC_DIR)