Skip to content
Snippets Groups Projects

Draft: PoC: Run Vale style check

Open Andrej Shadura requested to merge vale-lint into master
All threads resolved!
Files
16
+ 32
0
@@ -10,6 +10,38 @@ variables:
stages:
- generate-html
- generate-pdf
- stylecheck
vale-stylecheck:
image:
name: jdkato/vale
entrypoint: [""]
stage: stylecheck
needs: []
tags:
- lightweight
script:
- apk add jq
- |
for d in content/*/
do
config=.vale/vale.ini
n="$(basename ${d%/})"
# release notes have a list of issues often with typos in them
test "$n" != release || continue
# select the appropriate config, if needed
test ! -f ".vale/vale.d/$n.ini" || config=.vale/vale.d/$n.ini
echo Linting $n
vale --no-exit --config="$config" $d
vale --no-exit --config="$config" --output=JSON $d > output-$n.json
done
echo Merging and converting reports into Code Climate format
scripts/vale-to-codeclimate output-*.json > report.json
artifacts:
reports:
codequality: report.json
paths:
- output-*.json
test-html:
image: registry.gitlab.com/pages/hugo:0.62.2
Loading