add linting script for documentation
This commit is contained in:
parent
fb20758f1e
commit
a361f314f8
|
@ -224,6 +224,13 @@ teaspoon:
|
|||
script:
|
||||
- teaspoon
|
||||
|
||||
lint-doc:
|
||||
stage: test
|
||||
image: "phusion/baseimage:latest"
|
||||
before_script: []
|
||||
script:
|
||||
- scripts/lint-doc.sh
|
||||
|
||||
bundler:audit:
|
||||
stage: test
|
||||
<<: *ruby-static-analysis
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
# Use long options (e.g. --header instead of -H) for curl examples in documentation.
|
||||
grep --perl-regexp --recursive --color=auto 'curl (.+ )?-[^- ].*' doc/
|
||||
if [ $? == 0 ]
|
||||
then
|
||||
echo '✖ ERROR: Short options should not be used in documentation!' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "✔ Linting passed"
|
||||
exit 0
|
||||
|
Loading…
Reference in New Issue