Skip to content

Commit

Permalink
add syntax checker for xlf
Browse files Browse the repository at this point in the history
  • Loading branch information
Grégoire Paris committed Mar 27, 2015
1 parent 27d6959 commit 49bcfe4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/hooks/syntax-checker.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Description

Checks for syntax errors in files that have a checker, based on the file extension.
For the moment, there only is a php checker, located at `hooks/syntaxchecker/php/check.sh`.
For the moment, there is :

- a php checker, located at `hooks/syntaxchecker/php.sh`;
- an xliff checker, located at `hooks/syntaxchecker/xlf.sh`.

This hook is language-agnostic.

Expand Down
7 changes: 7 additions & 0 deletions template/hooks/syntaxchecker/xlf.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

type xmllint > /dev/null 2>&1
if [ $? -eq 0 ]
then
xmllint $FILE > /dev/null
fi

0 comments on commit 49bcfe4

Please sign in to comment.