From 49045b8506caa09335949ed97a56ad506a87d2c8 Mon Sep 17 00:00:00 2001 From: Matthew Andrews Date: Fri, 1 Apr 2016 20:20:26 +0100 Subject: [PATCH] =?UTF-8?q?Add=20yaml=20verification=20=E2=80=94=20closes?= =?UTF-8?q?=20#20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 143f683..09024d5 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ deplo%: _deploy_apex @$(DONE) # verify -verif%: _verify_lintspaces _verify_eslint _verify_scss_lint +verif%: _verify_lintspaces _verify_eslint _verify_scss_lint _verify_yaml @$(DONE) # build (includes build-production) @@ -88,6 +88,9 @@ _verify_eslint: _verify_lintspaces: @if [ -e .editorconfig ] && [ -e package.json ]; then $(call GLOB) | xargs lintspaces -e .editorconfig -i js-comments,html-comments && $(DONE); fi +_verify_yaml: + @if [ -e package.json ] && [ "$(shell $(call GLOB,'*.yml'))" != "" ]; then $(call GLOB,'*.yml') | xargs js-yaml > /dev/null && $(DONE); fi + _verify_scss_lint: # HACK: Use backticks rather than xargs because xargs swallow exit codes (everything becomes 1 and stoopidly scss-lint exits with 1 if warnings, 2 if errors) @if [ -e .scss-lint.yml ]; then { scss-lint -c ./.scss-lint.yml `$(call GLOB,'*.scss')`; if [ $$? -ne 0 -a $$? -ne 1 ]; then exit 1; fi; $(DONE); } fi