Commit 426824d2 authored by Joel Goddard's avatar Joel Goddard
Browse files

tools/qa-checks: Add QA check to validate YAML files



Add yaml_check.py to run yamllint on all yaml files to validate
the yaml files.

Updated yaml files with formatting corrections required to pass
yamllint without errors or warnings on the default settings.

Issue-Id: SCM-3902
Signed-off-by: Joel Goddard's avatarJoel Goddard <joel.goddard@arm.com>
Change-Id: Ibcd61c5f0a90879724a200d10c5e208c70fdc678
parent 4a5787cd
......@@ -2,6 +2,7 @@
#
# SPDX-License-Identifier: MIT
---
version: 2
sphinx:
configuration: documentation/conf.py
......@@ -9,4 +10,4 @@ formats:
- pdf
python:
install:
- requirements: documentation/requirements.txt
- requirements: documentation/requirements.txt
......@@ -39,6 +39,7 @@ to be reviewed and accepted by the EWAOL project:
* `Python Code Quality`_
* `Shell Script Code Quality`_
* `Spelling`_
* `YAML Formatting`_
* `Yocto Layer Compatibility`_
A set of QA checks are provided by the project to help automatically validate
......@@ -227,6 +228,15 @@ file containing a list of additional valid words exists at
``meta-ewaol-config/qa-checks/ewaol-dictionary`` which may be modified if the
QA check erroneously highlights valid technical terminology.
YAML Formatting
===============
All YAML files contributed to the project must pass validation as evaluated by
the ``yamllint`` Python-based linter for YAML files, which should report no warnings or
errors. This is run by default as part of the QA checks.
For more details on ``yamllint`` see |yamllint documentation|_.
Yocto Layer Compatibility
=========================
......
......@@ -39,6 +39,7 @@ external_links = {
"Docker documentation": "https://docs.docker.com",
"K3s documentation": "https://rancher.com/docs/k3s/latest/en",
"Xen documentation": "https://wiki.xenproject.org/wiki/Main_Page",
"yamllint documentation": "https://yamllint.readthedocs.io/en/stable/",
"Yocto Package Test": "https://wiki.yoctoproject.org/wiki/Ptest",
"Bash Automated Test System": "https://github.com/bats-core/bats-core",
"Python Datetime Format Codes": "https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes",
......
......@@ -2,6 +2,7 @@
#
# SPDX-License-Identifier: MIT
---
header:
version: 11
includes:
......
......@@ -2,6 +2,7 @@
#
# SPDX-License-Identifier: MIT
---
header:
version: 11
includes:
......
......@@ -2,6 +2,7 @@
#
# SPDX-License-Identifier: MIT
---
header:
version: 11
local_conf_header:
......
......@@ -2,6 +2,7 @@
#
# SPDX-License-Identifier: MIT
---
header:
version: 11
......@@ -13,4 +14,3 @@ repos:
meta-arm: included
meta-arm-bsp: included
meta-arm-toolchain: included
......@@ -2,6 +2,7 @@
#
# SPDX-License-Identifier: MIT
---
header:
version: 11
includes:
......@@ -67,11 +68,11 @@ target: unset
machine: unset
env:
SSTATE_MIRRORS: ""
SOURCE_MIRROR_URL: ""
INHERIT: ""
BB_GENERATE_MIRROR_TARBALLS: ""
BB_NUMBER_THREADS: "${@os.cpu_count()}"
EWAOL_ROOTFS_EXTRA_SPACE: "2000000"
EWAOL_GENERIC_ARM64_FILESYSTEM: "1"
EWAOL_GENERIC_ARM64_DEFAULTTUNE: "armv8a-crc"
SSTATE_MIRRORS: ""
SOURCE_MIRROR_URL: ""
INHERIT: ""
BB_GENERATE_MIRROR_TARBALLS: ""
BB_NUMBER_THREADS: "${@os.cpu_count()}"
EWAOL_ROOTFS_EXTRA_SPACE: "2000000"
EWAOL_GENERIC_ARM64_FILESYSTEM: "1"
EWAOL_GENERIC_ARM64_DEFAULTTUNE: "armv8a-crc"
......@@ -2,6 +2,7 @@
#
# SPDX-License-Identifier: MIT
---
header:
version: 11
......
......@@ -6,6 +6,7 @@
# EWAOL Next Release #
######################
---
header:
version: 11
......
......@@ -2,6 +2,7 @@
#
# SPDX-License-Identifier: MIT
---
header:
version: 11
......
......@@ -6,6 +6,7 @@
# we need to explicitly list three customizable variables per each additional
# Guest VM.
---
header:
version: 11
......
......@@ -2,6 +2,7 @@
#
# SPDX-License-Identifier: MIT
---
header:
version: 11
includes:
......
......@@ -2,6 +2,7 @@
#
# SPDX-License-Identifier: MIT
---
header:
version: 10
local_conf_header:
......
......@@ -2,6 +2,7 @@
#
# SPDX-License-Identifier: MIT
---
header:
version: 11
......
......@@ -2,6 +2,7 @@
#
# SPDX-License-Identifier: MIT
---
header:
version: 11
includes:
......
......@@ -2,6 +2,7 @@
#
# SPDX-License-Identifier: MIT
---
header:
version: 11
includes:
......
......@@ -122,6 +122,7 @@ libpcre
libpcre2
licensees
license.rst
linter
localhost
loopback
lts
......@@ -246,6 +247,7 @@ xendomains.service
xen_kernelcfg_check.bbclass
xl
yaml
yamllint
yocto
yocto_layers
yocto's
......@@ -14,6 +14,7 @@
# If a required variable is not defined for a particular QA-check module, a
# value from the defaults section will be used.
---
defaults:
paths:
- ROOT
......@@ -28,7 +29,8 @@ modules:
commits: "-1"
doc_build:
output_dir: "" # Use temporary directory
# Use temporary directory
output_dir: ""
header:
exclude_patterns:
......@@ -83,3 +85,12 @@ modules:
- "/documentation/index.rst"
- "/documentation/requirements.txt"
dict_path: "meta-ewaol-config/qa-checks/ewaol-dictionary"
yaml:
include_patterns:
- "*.yml"
- "*.yaml"
exclude_patterns:
- GITIGNORE_CONTENTS
- "*.git"
yamllint_args: "--strict"
......@@ -2,6 +2,7 @@
#
# SPDX-License-Identifier: MIT
---
apiVersion: apps/v1
kind: Deployment
metadata:
......@@ -19,7 +20,7 @@ spec:
app: k3s-test
spec:
containers:
- name: nginx
image: nginx:1.20
ports:
- containerPort: 80
- name: nginx
image: nginx:1.20
ports:
- containerPort: 80
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment