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

Commit d8a9357

Browse files
SonataCIjordisala1991
authored andcommitted
DevKit updates
1 parent 20a2d97 commit d8a9357

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

.editorconfig

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ charset = utf-8
1111
insert_final_newline = true
1212
trim_trailing_whitespace = true
1313

14-
[*.{yaml,yml,twig,php}]
14+
[*.{xml,yaml,yml,twig,php}]
1515
indent_size = 4
1616

1717
[.yamllint]
1818
indent_size = 4
1919

20-
[*.{js,json,scss,css}]
20+
[*.{xliff,js,json,scss,css}]
2121
indent_size = 2
2222

2323
[composer.json]

.github/workflows/lint.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,8 @@ jobs:
7272
- name: Install required dependencies
7373
run: sudo apt-get update && sudo apt-get install libxml2-utils
7474

75-
- name: Lint files
75+
- name: Lint xml files
7676
run: make lint-xml
77+
78+
- name: Lint xliff files
79+
run: make lint-xliff

Makefile

+14-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ all:
66
@echo "Please choose a task."
77
.PHONY: all
88

9-
lint: lint-composer lint-yaml lint-xml lint-php
9+
lint: lint-composer lint-yaml lint-xml lint-xliff lint-php
1010
.PHONY: lint
1111

1212
lint-composer:
@@ -19,7 +19,7 @@ lint-yaml:
1919
.PHONY: lint-yaml
2020

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

3131
.PHONY: lint-xml
3232

33+
lint-xliff:
34+
find . -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"|diff - "$$xmlFile"; \
40+
if [ $$? -ne 0 ] ;then exit 1; fi; \
41+
done
42+
43+
.PHONY: lint-xliff
44+
3345
lint-php:
3446
php-cs-fixer fix --ansi --verbose --diff --dry-run
3547
.PHONY: lint-php

0 commit comments

Comments
 (0)