5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-05-17 10:50:48 +00:00

feat: lint

This commit is contained in:
f 2024-01-08 17:52:00 -03:00
parent ef22f29d17
commit d581fab4df
No known key found for this signature in database

View file

@ -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"