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

Commit

Permalink
DevKit updates
Browse files Browse the repository at this point in the history
  • Loading branch information
SonataCI authored and VincentLanglet committed Aug 9, 2021
1 parent beaa8cd commit 49ae168
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true

[*.{yaml,yml,twig,php}]
[*.{xml,yaml,yml,twig,php}]
indent_size = 4

[.yamllint]
indent_size = 4

[*.{js,json,scss,css}]
[*.{xliff,js,json,scss,css}]
indent_size = 2

[composer.json]
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,8 @@ jobs:
- name: Install required dependencies
run: sudo apt-get update && sudo apt-get install libxml2-utils

- name: Lint files
- name: Lint xml files
run: make lint-xml

- name: Lint xliff files
run: make lint-xliff
16 changes: 14 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ all:
@echo "Please choose a task."
.PHONY: all

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

lint-composer:
Expand All @@ -19,7 +19,7 @@ lint-yaml:
.PHONY: lint-yaml

lint-xml:
find . \( -name '*.xml' -or -name '*.xliff' \) \
find . -name '*.xml' \
-not -path './vendor/*' \
-not -path './src/Resources/public/vendor/*' \
| while read xmlFile; \
Expand All @@ -30,6 +30,18 @@ lint-xml:

.PHONY: lint-xml

lint-xliff:
find . -name '*.xliff' \
-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-xliff

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

0 comments on commit 49ae168

Please sign in to comment.