summaryrefslogtreecommitdiff
path: root/.git-hooks
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2023-04-21 11:05:29 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2023-04-21 14:15:18 +0200
commitb1d341738d0902e3f71635b16d2d0f9ff63feb79 (patch)
tree01004dd889ec61118ca0b4305dd6b38e1c111703 /.git-hooks
parent50837fdd60d3d20b5025d94e243b09d92a166fb4 (diff)
related tdf#154946: check syntax in git pre-commit hook
Change-Id: If685f69227f98b194c124af0e28307d31edabf9c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150752 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to '.git-hooks')
-rwxr-xr-x.git-hooks/pre-commit4
1 files changed, 4 insertions, 0 deletions
diff --git a/.git-hooks/pre-commit b/.git-hooks/pre-commit
index 8dc4a6b751c4..f3ea7b093895 100755
--- a/.git-hooks/pre-commit
+++ b/.git-hooks/pre-commit
@@ -98,6 +98,10 @@ sub check_whitespaces($)
{
bad_line("OOXMLEXPORT definition used in a ooxmlimport file", $_, "cxx");
}
+ if ((/<toolbar:toolbaritem/) and not(/\/>/))
+ {
+ bad_line("Use /> to close toolbar:toolbaritem", $_, "xml");
+ }
if (/<property name="use[-_]markup">True<\/property>/)
{
bad_line("use font attributes instead of use-markup", $_, "ui");