Makefile 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # DO NOT EDIT THIS FILE!
  2. #
  3. # It's auto-generated by sonata-project/dev-kit package.
  4. all:
  5. @echo "Please choose a task."
  6. .PHONY: all
  7. lint: lint-composer lint-yaml lint-composer lint-xml lint-php
  8. .PHONY: lint
  9. lint-composer:
  10. composer validate
  11. .PHONY: lint-composer
  12. lint-yaml:
  13. find . -name '*.yml' -not -path './vendor/*' -not -path './src/Resources/public/vendor/*' | xargs yaml-lint
  14. .PHONY: lint-yaml
  15. lint-xml:
  16. find . \( -name '*.xml' -or -name '*.xliff' \) \
  17. -not -path './vendor/*' \
  18. -not -path './src/Resources/public/vendor/*' \
  19. | while read xmlFile; \
  20. do \
  21. XMLLINT_INDENT=' ' xmllint --encode UTF-8 --format "$$xmlFile"|diff - "$$xmlFile"; \
  22. if [ $$? -ne 0 ] ;then exit 1; fi; \
  23. done
  24. .PHONY: lint-xml
  25. lint-php:
  26. php-cs-fixer fix --ansi --verbose --diff --dry-run
  27. .PHONY: lint-php
  28. cs-fix: cs-fix-php cs-fix-xml
  29. .PHONY: cs-fix
  30. cs-fix-php:
  31. php-cs-fixer fix --verbose
  32. .PHONY: cs-fix-php
  33. cs-fix-xml:
  34. find . \( -name '*.xml' -or -name '*.xliff' \) \
  35. -not -path './vendor/*' \
  36. -not -path './src/Resources/public/vendor/*' \
  37. | while read xmlFile; \
  38. do \
  39. XMLLINT_INDENT=' ' xmllint --encode UTF-8 --format "$$xmlFile" --output "$$xmlFile"; \
  40. done
  41. .PHONY: cs-fix-xml
  42. test:
  43. phpunit -c phpunit.xml.dist --coverage-clover build/logs/clover.xml
  44. .PHONY: test
  45. docs:
  46. cd docs && sphinx-build -W -b html -d _build/doctrees . _build/html
  47. .PHONY: docs