forked from doctrine-extensions/DoctrineExtensions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (35 loc) · 1.01 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
all:
@echo "Please choose a task."
.PHONY: all
lint: lint-composer lint-yaml lint-xml
.PHONY: lint
lint-composer:
composer-normalize --dry-run
composer validate
.PHONY: lint-composer
lint-xml:
find './tests/.' \( -name '*.xml' \) \
| while read xmlFile; \
do \
XMLLINT_INDENT=' ' xmllint --encode UTF-8 --format "$$xmlFile"|diff - "$$xmlFile"; \
if [ $$? -ne 0 ]; then echo "$$xmlFile" && exit 1; fi; \
done
.PHONY: lint-xml
lint-doctrine-xml-schema:
find './tests/Gedmo/Mapping/Driver/Xml/.' \( -name '*.xml' \) \
| while read xmlFile; \
do \
xmllint --encode UTF-8 --format "$$xmlFile" --schema "./doctrine-mapping.xsd"; \
if [ $$? -ne 0 ]; then echo "$$xmlFile" && exit 1; fi; \
done
.PHONY: lint-doctrine-xml-schema
cs-fix-doctrine-xml:
find './tests/Gedmo/Mapping/Driver/Xml/.' \( -name '*.xml' \) \
| while read xmlFile; \
do \
XMLLINT_INDENT=' ' xmllint --encode UTF-8 --format "$$xmlFile" --output "$$xmlFile"; \
done
.PHONY: cs-fix-doctrine-xml
lint-yaml:
yamllint .
.PHONY: lint-yaml