Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

Commit

Permalink
Merge 05fc60b into 364512e
Browse files Browse the repository at this point in the history
  • Loading branch information
SonataCI committed Dec 31, 2017
2 parents 364512e + 05fc60b commit 5e9c902
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 8 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ env:
- SYMFONY_DEPRECATIONS_HELPER=weak
- TARGET=test
- UPSTREAM_URL=https://github.com/sonata-project/SonataAdminSearchBundle.git
- XMLLINT_INDENT=" "

matrix:
fast_finish: true
Expand Down
51 changes: 44 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,59 @@
#
# It's auto-generated by sonata-project/dev-kit package.

.PHONY: test docs

all:
@echo "Please choose a task."
.PHONY: all

lint: lint-composer lint-yaml lint-composer lint-xml lint-php
.PHONY: lint

lint:
lint-composer:
composer validate
find . -name '*.yml' -not -path './vendor/*' -not -path './Resources/public/vendor/*' | xargs yaml-lint
.PHONY: lint-composer

lint-yaml:
find . -name '*.yml' -not -path './vendor/*' -not -path './src/Resources/public/vendor/*' | xargs yaml-lint

.PHONY: lint-yaml

lint-xml:
find . \( -name '*.xml' -or -name '*.xliff' \) \
-not -path './vendor/*' -not -path './Resources/public/vendor/*' \
| xargs -I'{}' xmllint --encode UTF-8 --output '{}' --format '{}'
-not -path './vendor/*' \
-not -path './src/Resources/public/vendor/*' \
| while read xmlFile; \
do \
XMLLINT_INDENT=' ' xmllint --encode UTF-8 --format "$$xmlFile"|diff - "$$xmlFile"; \
if [ $$? -ne 0 ] ;then exit 1; fi; \
done

.PHONY: lint-xml

lint-php:
php-cs-fixer fix --ansi --verbose --diff --dry-run
.PHONY: lint-php

cs-fix: cs-fix-php cs-fix-xml
.PHONY: cs-fix

cs-fix-php:
php-cs-fixer fix --verbose
git diff --exit-code
.PHONY: cs-fix-php

cs-fix-xml:
find . \( -name '*.xml' -or -name '*.xliff' \) \
-not -path './vendor/*' \
-not -path './src/Resources/public/vendor/*' \
| while read xmlFile; \
do \
XMLLINT_INDENT=' ' xmllint --encode UTF-8 --format "$$xmlFile" --output "$$xmlFile"; \
done
.PHONY: cs-fix-xml

test:
phpunit -c phpunit.xml.dist --coverage-clover build/logs/clover.xml
.PHONY: test

docs:
cd docs && sphinx-build -W -b html -d _build/doctrees . _build/html
.PHONY: docs

0 comments on commit 5e9c902

Please sign in to comment.