Skip to content

Commit 97b82be

Browse files
committed
Added YAML linting
1 parent c88150c commit 97b82be

File tree

8 files changed

+44
-9
lines changed

8 files changed

+44
-9
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 config
270+
262271
translations:
263272
runs-on: ubuntu-20.04
264273
strategy:

.yamllint.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# @see https://yamllint.readthedocs.io/en/stable/configuration.html#extending-the-default-configuration
2+
extends: default
3+
4+
rules:
5+
comments:
6+
require-starting-space: false
7+
braces:
8+
forbid: false
9+
min-spaces-inside: 1
10+
max-spaces-inside: 1
11+
document-start:
12+
present: false
13+
indentation:
14+
spaces: 4
15+
# 80 chars should be enough, but don't fail if a line is longer
16+
line-length:
17+
max: 80
18+
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/packages/dev/web_profiler.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ web_profiler:
33
intercept_redirects: false
44

55
framework:
6-
profiler: { only_exceptions: false }
6+
profiler: {only_exceptions: false}

config/packages/twig.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ twig:
99
form_themes: ['bootstrap_4_layout.html.twig', 'form/theme.html.twig']
1010

1111
date:
12-
format: 'd/m/Y H:i'
13-
# By default translate all datetimes to Copenhagen timezone.
14-
# Exceptions are agenda & agenda items start/end time.
15-
# @see e.g. templates/agenda/index.html.twig
16-
# @see https://twig.symfony.com/doc/2.x/filters/date.html#timezone
17-
timezone: Europe/Copenhagen
12+
format: 'd/m/Y H:i'
13+
# By default translate all datetimes to Copenhagen timezone.
14+
# Exceptions are agenda & agenda items start/end time.
15+
# @see e.g. templates/agenda/index.html.twig
16+
# @see https://twig.symfony.com/doc/2.x/filters/date.html#timezone
17+
timezone: Europe/Copenhagen
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
itkdev_openid_connect:
22
resource: "@ItkDevOpenIdConnectBundle/src/Resources/config/routes.yaml"
3-
prefix: "/openidconnect" # Prefix for bundle routes
3+
prefix: "/openidconnect" # Prefix for bundle routes

0 commit comments

Comments
 (0)