From ba66d19968bd72e85e5bf1dde0203c387de0d876 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Mon, 6 May 2024 22:52:05 +0200 Subject: [PATCH] enable linter --- .woodpecker/lint.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .woodpecker/lint.yml diff --git a/.woodpecker/lint.yml b/.woodpecker/lint.yml new file mode 100644 index 0000000..5faa4cb --- /dev/null +++ b/.woodpecker/lint.yml @@ -0,0 +1,29 @@ +--- +steps: + gitleaks: + image: zricethezav/gitleaks:v8.18.2 + commands: + - gitleaks detect --no-git --verbose --source $CI_WORKSPACE + when: + - evaluate: 'CI_COMMIT_AUTHOR_EMAIL != "renovate@mgrote.net"' + + hadolint: + image: pipelinecomponents/hadolint:0.26.1 + commands: + - hadolint Dockerfile + when: + - evaluate: 'CI_COMMIT_AUTHOR_EMAIL != "renovate@mgrote.net"' + + shellcheck: + image: "koalaman/shellcheck-alpine:v0.10.0" + commands: + - | + find . -type f -not -path './.git/*' -not -path './collections/*' -exec file {} \; | while IFS= read -r line; do + if echo "$line" | grep -q "shell script"; then + file_path=$(echo "$line" | awk -F':' '{print $1}') + shellcheck "$file_path" + fi + done + when: + - evaluate: 'CI_COMMIT_AUTHOR_EMAIL != "renovate@mgrote.net"' +...