From bbbf15f1b4315bb3436c4d1f2909aa46fc0fe4ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Prchl=C3=ADk?= Date: Thu, 25 Apr 2024 23:06:23 +0200 Subject: [PATCH] Fix yamllint in pre-commit It did not run correctly. --- .pre-commit-config.yaml | 1 + .yamllint | 10 ++++++++++ plans/build-gating.fmf | 16 ++++++++-------- .../main.fmf | 2 +- .../main.fmf | 4 ++-- .../main.fmf | 2 +- tests/main.fmf | 5 +++++ tests/rebuilds/kernel/main.fmf | 2 +- tests/supported-targets/main.fmf | 4 ++-- tests/testsuite/main.fmf | 14 +++++++------- 10 files changed, 38 insertions(+), 22 deletions(-) create mode 100644 .yamllint diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index be5f77a..ca60a53 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -26,6 +26,7 @@ repos: rev: v1.32.0 hooks: - id: yamllint + types: [file] files: "^.*?\\.fmf$" - repo: https://github.com/teemtee/tmt.git diff --git a/.yamllint b/.yamllint new file mode 100644 index 0000000..5f9db0a --- /dev/null +++ b/.yamllint @@ -0,0 +1,10 @@ +--- + +extends: default + +rules: + document-start: + present: false + + line-length: + max: 120 diff --git a/plans/build-gating.fmf b/plans/build-gating.fmf index 4910441..d90b5ec 100644 --- a/plans/build-gating.fmf +++ b/plans/build-gating.fmf @@ -62,13 +62,13 @@ adjust+: processors: ">= 8" /common: - discover: - - how: fmf - filter: "tag:gate-build" - exclude: '^/tests/rebuilds/kernel$' + discover: + - how: fmf + filter: "tag:gate-build" + exclude: '^/tests/rebuilds/kernel$' /kernel-rebuild: - discover: - - how: fmf - filter: "tag:gate-build" - test: '^/tests/rebuilds/kernel$' + discover: + - how: fmf + filter: "tag:gate-build" + test: '^/tests/rebuilds/kernel$' diff --git a/tests/bugs/bytecode-stream-in-file-libbfd.a-generated-with-LTO-version-11.3-instead-of-the-expected-13.0/main.fmf b/tests/bugs/bytecode-stream-in-file-libbfd.a-generated-with-LTO-version-11.3-instead-of-the-expected-13.0/main.fmf index 2cb9941..c34e18e 100644 --- a/tests/bugs/bytecode-stream-in-file-libbfd.a-generated-with-LTO-version-11.3-instead-of-the-expected-13.0/main.fmf +++ b/tests/bugs/bytecode-stream-in-file-libbfd.a-generated-with-LTO-version-11.3-instead-of-the-expected-13.0/main.fmf @@ -1,4 +1,4 @@ -summary: bytecode stream in file ‘/opt/rh/gcc-toolset-13/root/usr/lib64/libbfd.a’ generated with LTO version 11.3 instead of the expected 13.0 +summary: bytecode stream in file ‘/opt/rh/gcc-toolset-13/root/usr/lib64/libbfd.a’ generated with LTO version 11.3 duration: 10m diff --git a/tests/bugs/dwz-applied-to-a-dts-compiled-binary-complains/main.fmf b/tests/bugs/dwz-applied-to-a-dts-compiled-binary-complains/main.fmf index b7f2d92..8fa524b 100644 --- a/tests/bugs/dwz-applied-to-a-dts-compiled-binary-complains/main.fmf +++ b/tests/bugs/dwz-applied-to-a-dts-compiled-binary-complains/main.fmf @@ -9,8 +9,8 @@ link+: - verifies: https://bugzilla.redhat.com/show_bug.cgi?id=1366145 adjust+: - # DWZ is not available in RHEL-6 - unless you have collection installed, - # then you can use (and test) dwz from collection package. + # DWZ is not available in RHEL-6 - unless you have collection installed, + # then you can use (and test) dwz from collection package. - when: distro == rhel-6 and collection is not defined enabled: false diff --git a/tests/bugs/programs-linked-with-gcc-static-s-fail-with-unexpected-reloc-type-in-static-binary/main.fmf b/tests/bugs/programs-linked-with-gcc-static-s-fail-with-unexpected-reloc-type-in-static-binary/main.fmf index 840bc1a..ada52cc 100644 --- a/tests/bugs/programs-linked-with-gcc-static-s-fail-with-unexpected-reloc-type-in-static-binary/main.fmf +++ b/tests/bugs/programs-linked-with-gcc-static-s-fail-with-unexpected-reloc-type-in-static-binary/main.fmf @@ -5,7 +5,7 @@ description: | stripping with strip works fine. contact+: - - Michal Nowak + - Michal Nowak require+: - glibc-static diff --git a/tests/main.fmf b/tests/main.fmf index 5787ea5..01baa7f 100644 --- a/tests/main.fmf +++ b/tests/main.fmf @@ -127,6 +127,7 @@ adjust+: WITH_SCL: scl enable gcc-toolset-13 BINUTILS_PACKAGE: gcc-toolset-13-binutils GCC_PACKAGE: gcc-toolset-13-gcc + # yamllint disable-line rule:line-length COLLECTION_PACKAGES: gcc-toolset-13-binutils gcc-toolset-13-binutils-devel gcc-toolset-13-binutils-gold gcc-toolset-13-binutils-gprofng - when: distro == rhel-9 and collection == gcc-toolset-13 and arch != x86_64,aarch64 @@ -199,6 +200,7 @@ adjust+: WITH_SCL: scl enable gcc-toolset-13 BINUTILS_PACKAGE: gcc-toolset-13-binutils GCC_PACKAGE: gcc-toolset-13-gcc + # yamllint disable-line rule:line-length COLLECTION_PACKAGES: gcc-toolset-13-binutils gcc-toolset-13-binutils-devel gcc-toolset-13-binutils-gold gcc-toolset-13-binutils-gprofng - when: distro == rhel-8 and collection == gcc-toolset-13 and arch != x86_64,aarch64 @@ -231,6 +233,7 @@ adjust+: environment+: PACKAGES: gcc-toolset-12-binutils TOOLSET: gcc-toolset-12 + # yamllint disable-line rule:line-length _REQUIRES: gcc-toolset-12-gcc gcc-toolset-12-gcc-c++ gcc-toolset-12-gcc-plugin-annobin gcc-toolset-12-annobin-plugin-gcc glibc WITH_SCL: scl enable gcc-toolset-12 BINUTILS_PACKAGE: gcc-toolset-12-binutils @@ -270,6 +273,7 @@ adjust+: WITH_SCL: scl enable devtoolset-13 BINUTILS_PACKAGE: devtoolset-13-binutils GCC_PACKAGE: devtoolset-13-gcc + # yamllint disable-line rule:line-length COLLECTION_PACKAGES: devtoolset-13-binutils devtoolset-13-binutils-devel devtoolset-13-binutils-gold devtoolset-13-binutils-gprofng # RHEL-7 / devtoolset-12 @@ -395,6 +399,7 @@ adjust+: environment+: PACKAGES: gcc-toolset-12-binutils TOOLSET: gcc-toolset-12 + # yamllint disable-line rule:line-length _REQUIRES: gcc-toolset-12-gcc gcc-toolset-12-gcc-c++ gcc-toolset-12-gcc-plugin-annobin gcc-toolset-12-annobin-plugin-gcc glibc WITH_SCL: scl enable gcc-toolset-12 BINUTILS_PACKAGE: gcc-toolset-12-binutils diff --git a/tests/rebuilds/kernel/main.fmf b/tests/rebuilds/kernel/main.fmf index 50bef39..4968f9c 100644 --- a/tests/rebuilds/kernel/main.fmf +++ b/tests/rebuilds/kernel/main.fmf @@ -49,7 +49,7 @@ adjust+: - because: "kernel package is gone from recent Fedora default installation" when: distro >= fedora-38 environment+: - KERNEL: kernel-core + KERNEL: kernel-core - because: "python-devel has different names in different distros" when: distro >= rhel-8.6 and distro <= rhel-8.9 diff --git a/tests/supported-targets/main.fmf b/tests/supported-targets/main.fmf index 6cf5c60..5bbcb0c 100644 --- a/tests/supported-targets/main.fmf +++ b/tests/supported-targets/main.fmf @@ -8,8 +8,8 @@ contact+: adjust+: - when: distro == centos-stream-9 environment+: - BASELINE: "9" + BASELINE: "9" - when: distro == centos-stream-8 environment+: - BASELINE: "8" + BASELINE: "8" diff --git a/tests/testsuite/main.fmf b/tests/testsuite/main.fmf index 82ac30f..29ab9a1 100644 --- a/tests/testsuite/main.fmf +++ b/tests/testsuite/main.fmf @@ -38,25 +38,25 @@ adjust+: when: distro == rhel-9.3 and collection == gcc-toolset-13 test: "$WITH_SCL ./test-with-cross.sh" environment+: - MAY_BUILD_OTHER_ARCHES: "no" + MAY_BUILD_OTHER_ARCHES: "no" - because: "On RHEL-9.3.0 and newer, gcc-toolset-13 binutils build has extra directory levels" when: distro == rhel-9.4 and collection == gcc-toolset-13 test: "$WITH_SCL ./test-with-cross.sh" environment+: - MAY_BUILD_OTHER_ARCHES: "no" + MAY_BUILD_OTHER_ARCHES: "no" - because: "On RHEL-8.10.0 and newer, system binutils build extra binaries for cross compilation" when: distro == rhel-8.10 and collection is not defined test: "$WITH_SCL ./test-with-cross.sh" environment+: - MAY_BUILD_OTHER_ARCHES: "no" + MAY_BUILD_OTHER_ARCHES: "no" - because: "On RHEL-8.10.0 and newer, gcc-toolset-13 binutils build has extra directory levels" when: distro == rhel-8.10 and collection == gcc-toolset-13 test: "$WITH_SCL ./test-with-cross.sh" environment+: - MAY_BUILD_OTHER_ARCHES: "no" + MAY_BUILD_OTHER_ARCHES: "no" - because: "On CentOS Stream 9, system binutils build extra binaries for cross compilation" when: distro == centos-stream-9 and collection is not defined @@ -66,16 +66,16 @@ adjust+: when: distro == centos-stream-9 and collection == gcc-toolset-13 test: "$WITH_SCL ./test-with-cross.sh" environment+: - MAY_BUILD_OTHER_ARCHES: "no" + MAY_BUILD_OTHER_ARCHES: "no" - because: "On Fedora 39 and newer, system binutils build extra binaries for cross compilation" when: distro == fedora-rawhide test: "$WITH_SCL ./test-with-cross.sh" environment+: - MAY_BUILD_OTHER_ARCHES: "no" + MAY_BUILD_OTHER_ARCHES: "no" - because: "On Fedora 40 and newer, system binutils build extra binaries for cross compilation" when: distro >= fedora-38 test: "$WITH_SCL ./test-with-cross.sh" environment+: - MAY_BUILD_OTHER_ARCHES: "no" + MAY_BUILD_OTHER_ARCHES: "no"