CI: Add format-yaml (#6838)

This commit is contained in:
Wilson Snyder 2025-12-18 21:45:43 -05:00 committed by GitHub
parent c2c00888d6
commit be08862109
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 13 additions and 4 deletions

View File

@ -45,6 +45,6 @@ jobs:
make venv
- name: Lint
run: |
run: |-
source .venv/bin/activate
make -k lint-py

View File

@ -535,11 +535,18 @@ PY_FILES = \
# Python files, test_regress tests
PY_TEST_FILES = test_regress/t/*.py
# YAML files
YAML_FILES = \
.*.yaml \
.*.yml \
.github/*.yml \
.github/*/*.yml \
######################################################################
# Format
format:
$(MAKE) -j 5 format-c format-cmake format-exec format-py
$(MAKE) -j 5 format-c format-cmake format-exec format-py format-yaml
BEAUTYSH = beautysh
BEAUTYSH_FLAGS = --indent-size 2
@ -583,10 +590,11 @@ format-py yapf:
$(YAPF) $(YAPF_FLAGS) $(PY_FILES)
YAMLFIX = YAMLFIX_WHITELINES=1 YAMLFIX_LINE_LENGTH=200 YAMLFIX_preserve_quotes=true yamlfix
YAMLFIX_FLAGS =
format-yaml yamlfix:
$(YAMLFIX) --version
$(YAMLFIX) .
$(YAMLFIX) $(YAMLFIX_FLAGS) $(YAML_FILES)
######################################################################
# Lint

View File

@ -25,9 +25,10 @@ mypy==1.19.0
pylint==3.0.2
ruff==0.14.8
sarif-tools==3.0.5
sphinx_rtd_theme==3.0.2
sphinx==8.1.3
sphinx_rtd_theme==3.0.2
sphinxcontrib-spelling==8.0.2
yamlfix==1.19.1
yapf==0.43.0
git+https://github.com/antmicro/astsee.git