Lint only changed files (#375)
* only lint changed files * deeper * filter for md * de-overengineer
This commit is contained in:
parent
c3eabc33dc
commit
6d7ce283dd
|
@ -10,6 +10,8 @@ jobs:
|
|||
steps:
|
||||
- name: Check out repo
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 2
|
||||
|
||||
- name: Install Markdownlint-cli
|
||||
run: |
|
||||
|
@ -17,4 +19,4 @@ jobs:
|
|||
|
||||
- name: Lint
|
||||
run: |
|
||||
markdownlint -i _* --disable MD033 MD034 MD013 MD024 MD036 -- .
|
||||
bash ./wiki-tools/lint.sh
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
CHANGED=$(git diff --name-only HEAD HEAD~1 | grep -v '^_' | grep '.md$')
|
||||
if [ "$CHANGED" == "" ]; then
|
||||
exit 0
|
||||
fi
|
||||
markdownlint -i '_*' --disable MD033 MD034 MD013 MD024 MD036 -- $CHANGED
|
Loading…
Reference in New Issue