Skip to content

Commit

Permalink
Merge branch 'master' into pre-commit-hook-config-lang
Browse files Browse the repository at this point in the history
  • Loading branch information
jbguerraz authored Apr 10, 2019
2 parents b3f2d47 + f921d7b commit 9f51ab3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
14 changes: 12 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Add utility functions and scripts to the container
include scripts/makefile/*.mk

.PHONY: all provision si exec exec0 down clean dev info phpcs phpcbf drush check hooksymlink hookexec
.PHONY: all provision si exec exec0 down clean dev info phpcs phpcbf drush cinsp hooksymlink hookexec
.DEFAULT_GOAL := help

# https://stackoverflow.com/a/6273809/1826109
Expand Down Expand Up @@ -158,7 +158,6 @@ else
@echo "scripts/git_hooks/pre-commit.sh file does not exist"
endif


## Execute git hooks
hookexec:
ifneq ("$(wildcard scripts/git_hooks/pre-commit.sh)","")
Expand All @@ -167,3 +166,14 @@ ifneq ("$(wildcard scripts/git_hooks/pre-commit.sh)","")
else
@echo "scripts/git_hooks/pre-commit.sh file does not exist"
endif

## Inspect configuration
cinsp:
@echo "Config schema validation..."
@$(call php, drush -y en config_inspector)
@$(eval SCHEMA_ERRORS = $(shell docker-compose exec -T --user $(CUID):$(CGID) php drush inspect_config --only-error))
@$(call php, drush -y pmu config_inspector)
@if [ ! -z "$(SCHEMA_ERRORS)" ]; then echo "Error(s) in config schemas"; exit 1; fi

## Full inspection
insp: | cinsp phpcs
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"drupal-composer/drupal-scaffold": "^2.5",
"drupal/admin_toolbar": "^1",
"drupal/components": "^1",
"drupal/config_inspector": "^1.0@beta",
"drupal/config_installer": "^1",
"drupal/core": "^8.6.7",
"drupal/default_content": "^1",
Expand Down

0 comments on commit 9f51ab3

Please sign in to comment.