mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 10:59:53 +00:00
adds yaml linting to CI and applies rules to existing yaml files. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6682-ci-add-yamllint-2aa6d73d365081b4b67ae9d9cc86760f) by [Unito](https://www.unito.io)
15 lines
298 B
Bash
Executable File
15 lines
298 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
ROOT_DIR="$(git rev-parse --show-toplevel)"
|
|
cd "$ROOT_DIR"
|
|
|
|
mapfile -t yaml_files < <(git ls-files '*.yml' '*.yaml')
|
|
|
|
if [[ ${#yaml_files[@]} -eq 0 ]]; then
|
|
echo "No YAML files found to lint"
|
|
exit 0
|
|
fi
|
|
|
|
yamllint --config-file .yamllint "${yaml_files[@]}"
|