Skip to content

Commit 49bcfe4

Browse files
author
Grégoire Paris
committed
add syntax checker for xlf
1 parent 27d6959 commit 49bcfe4

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

docs/hooks/syntax-checker.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# Description
22

33
Checks for syntax errors in files that have a checker, based on the file extension.
4-
For the moment, there only is a php checker, located at `hooks/syntaxchecker/php/check.sh`.
4+
For the moment, there is :
5+
6+
- a php checker, located at `hooks/syntaxchecker/php.sh`;
7+
- an xliff checker, located at `hooks/syntaxchecker/xlf.sh`.
58

69
This hook is language-agnostic.
710

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
3+
type xmllint > /dev/null 2>&1
4+
if [ $? -eq 0 ]
5+
then
6+
xmllint $FILE > /dev/null
7+
fi

0 commit comments

Comments
 (0)