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

DevKit updates for 3.x branch #302

Merged
merged 1 commit into from
Dec 31, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/SonataNotificationBundle.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