Skip to content

Commit 6d796c2

Browse files
committed
Added YAML linting
1 parent c88150c commit 6d796c2

33 files changed

+1991
-1941
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ charset = utf-8
1313
trim_trailing_whitespace = true
1414
insert_final_newline = true
1515

16-
[*.{js,scss,yaml}]
16+
[*.{js,scss}]
1717
indent_size = 2

.github/workflows/pr.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,15 @@ jobs:
259259
- name: markdownlint
260260
run: yarn check-coding-standards/markdownlint
261261

262+
yamllint:
263+
name: yamllint
264+
runs-on: ubuntu-latest
265+
steps:
266+
- name: Checkout
267+
uses: actions/checkout@v2
268+
- name: yamllint
269+
run: docker run --rm --volume $(pwd):/data cytopia/yamllint -f github .
270+
262271
translations:
263272
runs-on: ubuntu-20.04
264273
strategy:

.yamllint.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# @see https://yamllint.readthedocs.io/en/stable/configuration.html#extending-the-default-configuration
2+
extends: default
3+
4+
ignore:
5+
- .docker/
6+
- .github/
7+
- node_modules/
8+
- vendor/
9+
- 'docker-compose*.yml'
10+
11+
rules:
12+
# @see https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.braces
13+
braces:
14+
min-spaces-inside: 1
15+
max-spaces-inside: 1
16+
# @see https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.brackets
17+
brackets:
18+
min-spaces-inside: 0
19+
max-spaces-inside: 1
20+
# @see https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.comments
21+
comments:
22+
min-spaces-from-content: 1
23+
require-starting-space: false
24+
# @see https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.document_start
25+
document-start:
26+
present: false
27+
# @see https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.indentation
28+
indentation:
29+
spaces: 4
30+
# 80 chars should be enough, but don't fail if a line is longer
31+
line-length:
32+
max: 160
33+
level: warning

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ about writing changes to this log.
1010

1111
## [Unreleased]
1212

13+
- Added YAML linting.
14+
1315
## [1.1.2] 2023-02-17
1416

1517
- [SUPP0RT-874](https://jira.itkdev.dk/browse/SUPP0RT-874)

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,12 @@ we decided to adhere to in this project.
370370
docker run -v ${PWD}:/app itkdev/yarn:latest markdownlint README.md
371371
```
372372

373+
* YAML
374+
375+
```sh
376+
docker run --rm --volume $(pwd):/data cytopia/yamllint config
377+
```
378+
373379
## Code analysis
374380

375381
We use [PHPStan](https://phpstan.org/) and [Psalm](https://psalm.dev/) for code

config/config.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# app/config/config.yml
22
twig:
3-
form_themes:
4-
- LexikFormFilterBundle:Form:form_div_layout.html.twig
3+
form_themes:
4+
- LexikFormFilterBundle:Form:form_div_layout.html.twig
55

66
lexik_form_filter:
7-
listeners:
8-
doctrine_orm: true
9-
doctrine_dbal: false
10-
doctrine_mongodb: false
11-
where_method: ~ # null | and | or
7+
listeners:
8+
doctrine_orm: true
9+
doctrine_dbal: false
10+
doctrine_mongodb: false
11+
where_method: ~ # null | and | or

config/packages/dev/security.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
security:
2-
firewalls:
3-
main:
4-
custom_authenticators:
5-
- App\Security\MasqueradeAuthenticator
2+
firewalls:
3+
main:
4+
custom_authenticators:
5+
- App\Security\MasqueradeAuthenticator

config/packages/doctrine.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ doctrine:
2323
prefix: 'App\Monolog'
2424
alias: Log
2525
filters:
26-
case_deleted_filter:
27-
class: App\Doctrine\CaseDeletedFilter
28-
enabled: true
26+
case_deleted_filter:
27+
class: App\Doctrine\CaseDeletedFilter
28+
enabled: true

config/packages/fos_ckeditor.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ fos_ck_editor:
1919
editor:
2020
- ['Bold', 'Italic', 'Underline', 'StrikeThrough']
2121
- ['BulletedList', 'NumberedList']
22-
- ['Outdent', 'Indent', 'TextColor']
22+
- ['Outdent', 'Indent', 'TextColor']
Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
itkdev_openid_connect:
2-
cache_options:
3-
cache_pool: 'cache.app' # Cache item pool for caching discovery document and CLI login tokens
4-
cli_login_options:
5-
cli_redirect: '%env(CLI_REDIRECT)%' # Redirect route for CLI login
6-
openid_providers:
7-
admin:
8-
options:
9-
metadata_url: '%env(ADMIN_OIDC_METADATA_URL)%'
10-
client_id: '%env(ADMIN_OIDC_CLIENT_ID)%'
11-
client_secret: '%env(ADMIN_OIDC_CLIENT_SECRET)%'
12-
redirect_route: 'default'
2+
cache_options:
3+
cache_pool: 'cache.app' # Cache item pool for caching discovery document and CLI login tokens
4+
cli_login_options:
5+
cli_redirect: '%env(CLI_REDIRECT)%' # Redirect route for CLI login
6+
openid_providers:
7+
admin:
8+
options:
9+
metadata_url: '%env(ADMIN_OIDC_METADATA_URL)%'
10+
client_id: '%env(ADMIN_OIDC_CLIENT_ID)%'
11+
client_secret: '%env(ADMIN_OIDC_CLIENT_SECRET)%'
12+
redirect_route: 'default'
1313

14-
board-member:
15-
options:
16-
metadata_url: '%env(BOARD_MEMBER_OIDC_METADATA_URL)%'
17-
client_id: '%env(BOARD_MEMBER_OIDC_CLIENT_ID)%'
18-
client_secret: '%env(BOARD_MEMBER_OIDC_CLIENT_SECRET)%'
19-
redirect_route: 'default'
14+
board-member:
15+
options:
16+
metadata_url: '%env(BOARD_MEMBER_OIDC_METADATA_URL)%'
17+
client_id: '%env(BOARD_MEMBER_OIDC_CLIENT_ID)%'
18+
client_secret: '%env(BOARD_MEMBER_OIDC_CLIENT_SECRET)%'
19+
redirect_route: 'default'

0 commit comments

Comments
 (0)