File tree 1 file changed +7
-3
lines changed
modules/user-guide/examples
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -13,14 +13,18 @@ code_quality:
13
13
- apk update && apk add git jq
14
14
- vale sync # Pull down VRH rules package specified in vale.ini
15
15
script :
16
- # List of updated/modified *.adoc files
17
- - FILES=$(find . -type f -name "*.adoc")
16
+ # Get list of *.adoc files
17
+ - |
18
+ if [ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]; then
19
+ FILES=$(find . -type f -name "*.adoc")
20
+ else
21
+ FILES=$(git diff --name-only HEAD~1 HEAD --diff-filter=d "*.adoc")
22
+ fi
18
23
# Clean out conditions for wider vale coverage
19
24
- sed -i -e 's/ifdef::.*\|ifndef::.*\|ifeval::.*\|endif::.*/ /' ${FILES}
20
25
# Use a template to rearrange the vale JSON output
21
26
# Run vale with --no-exit to pass the build with errors
22
27
- vale ${FILES} --minAlertLevel=error --glob='*.adoc' --output="$(pwd)/vale-json.tmpl" | jq . > gl-code-quality-report.json
23
- - echo $CI_DEFAULT_BRANCH
24
28
artifacts :
25
29
reports :
26
30
codequality : gl-code-quality-report.json
You can’t perform that action at this time.
0 commit comments