Added make lint-changed which lints changed files only.

This commit is contained in:
Ruben Vereecken
2015-04-14 22:15:00 +02:00
parent 075c96c3ce
commit 4b44492314
3 changed files with 13 additions and 2 deletions

6
scripts/lint-changed.sh Executable file
View File

@@ -0,0 +1,6 @@
#!/bin/bash
MD_FILES=`git diff --cached --name-only | tr " " "\n" | egrep ^.*\.md$`
# Execute Markdown lint if any markdown files have been changed and added to git
[[ -z "$MD_FILES" ]] || GEM_PATH=.gem .gem/bin/mdl "$MD_FILES"

View File

@@ -2,3 +2,4 @@
make index
git add ./pages/index.json
make lint-changed