From d581fab4dfda56edbfc22a077678e6618f167076 Mon Sep 17 00:00:00 2001 From: f Date: Mon, 8 Jan 2024 17:52:00 -0300 Subject: [PATCH] feat: lint --- .gitlab-ci.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a2afebff..ee2a7a10 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,10 +23,36 @@ assets: gem-audit: stage: "audit" before_script: + - "apk add go-task" - "gem install bundler-audit" script: - "go-task gem-audit" node-audit: stage: "audit" script: + - "apk add go-task" - "go-task node-audit" +brakeman: + stage: "lint" + rules: + - if: "$CI_PIPELINE_SOURCE == \"merge_request_event\"" + before_script: + - "apk add go-task" + script: + - "go-task bundle -- exec brakeman" +rubocop: + stage: "lint" + rules: + - if: "$CI_PIPELINE_SOURCE == \"merge_request_event\"" + before_script: + - "apk add go-task" + script: + - "git diff --name-status ${CI_MERGE_REQUEST_DIFF_BASE_SHA}...HEAD | grep -v \"^D\" | cut -f 2 | grep \"\.rb$\" | xargs go-task bundle -- exec rubocop" +haml: + stage: "lint" + rules: + - if: "$CI_PIPELINE_SOURCE == \"merge_request_event\"" + before_script: + - "apk add go-task" + script: + - "git diff --name-status ${CI_MERGE_REQUEST_DIFF_BASE_SHA}...HEAD | grep -v \"^D\" | cut -f 2 | grep \"\.haml$\" | xargs go-task bundle -- exec haml-lint"