From 9a014b5d621d8ccbc7575e27aa765aafaadf9d4a Mon Sep 17 00:00:00 2001 From: Joachim Bauch Date: Thu, 22 May 2014 18:55:48 +0200 Subject: [PATCH 1/2] Added target "styleshint" to check syntax of .scss files. --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 62dbfa51..eca99968 100644 --- a/Makefile +++ b/Makefile @@ -104,6 +104,9 @@ styles: sass --compass --scss $(SASSFLAGS) \ $(CURDIR)/src/styles/font-awesome.scss:$(CURDIR)/static/css/font-awesome.min.css +styleshint: + find src/styles -maxdepth 1 -name "*.scss" -print0 | xargs -0 -n1 sass --compass --scss $(SASSFLAGS) -c + releaseassets: RJSFLAGS = generateSourceMaps=false preserveLicenseComments=true releaseassets: SASSFLAGS = --style=compressed --no-cache releaseassets: dist_gopath assets From ccf09b3e6c250e860a4a8a90cb6f4cf271e4f2b4 Mon Sep 17 00:00:00 2001 From: Joachim Bauch Date: Thu, 22 May 2014 18:57:14 +0200 Subject: [PATCH 2/2] Only check styles syntax using new "styleshint" target. --- src/hooks/pre-commit.hook | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/pre-commit.hook b/src/hooks/pre-commit.hook index 1c3ae96d..17098f1b 100755 --- a/src/hooks/pre-commit.hook +++ b/src/hooks/pre-commit.hook @@ -34,7 +34,7 @@ for file in `git diff-index --cached --name-only HEAD --diff-filter=ACMR| grep " done if [ "${check_styles}" = "1" ]; then - make styles + make styleshint r=$? if [ $r != 0 ] ; then echo "================================================================================================="