Skip to content
代码片段 群组 项目
未验证 提交 a65fb774 编辑于 作者: ddieulivol's avatar ddieulivol
浏览文件

Add yamllint to lefthook

上级 1d931ed1
No related branches found
No related tags found
无相关合并请求
...@@ -18,6 +18,11 @@ pre-push: ...@@ -18,6 +18,11 @@ pre-push:
files: git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD files: git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
glob: 'doc/*.md' glob: 'doc/*.md'
run: yarn markdownlint {files} run: yarn markdownlint {files}
yamllint:
tags: backend style
files: git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
glob: '*.{yml,yaml}'
run: scripts/lint-yaml.sh {files}
stylelint: stylelint:
tags: stylesheet css style tags: stylesheet css style
files: git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD files: git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
......
#!/usr/bin/env bash
set -euo pipefail
if ! command -v yamllint > /dev/null; then
echo "ERROR: yamllint is not installed. For more information, see https://yamllint.readthedocs.io/en/stable/index.html."
exit 1
fi
yamllint --strict -f colored "$@"
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册