From 4347af833a3cf1fc4cc1c4bc10bf924c89336759 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Sat, 21 Mar 2026 00:18:52 +0100 Subject: [PATCH] chore: Use more descriptive names for helper scripts Signed-off-by: Michael Vetter --- .github/workflows/main.yml | 6 +++--- CONTRIBUTING.md | 8 ++++---- Makefile.am | 2 +- meson.build | 2 +- ci/ci-build.sh => scripts/build-configuration-matrix.sh | 2 ++ scripts/{quality-check.sh => lint-and-test.sh} | 6 +++--- 6 files changed, 14 insertions(+), 12 deletions(-) rename ci/ci-build.sh => scripts/build-configuration-matrix.sh (98%) rename scripts/{quality-check.sh => lint-and-test.sh} (96%) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d7442f5f..d046e09b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,17 +21,17 @@ jobs: buildsystem: autotools tests: unit omemo: signal - script: ./ci/ci-build.sh + script: ./scripts/build-configuration-matrix.sh - flavor: fedora buildsystem: autotools tests: unit omemo: signal - script: ./ci/ci-build.sh + script: ./scripts/build-configuration-matrix.sh - flavor: ubuntu buildsystem: autotools tests: unit omemo: signal - script: ./ci/ci-build.sh + script: ./scripts/build-configuration-matrix.sh - flavor: debian buildsystem: meson tests: unit diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d402d35c..22671b1a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -192,7 +192,7 @@ snippet to `.git/hooks/pre-push`: ```shell #!/bin/sh set -e -./ci/ci-build.sh +./scripts/build-configuration-matrix.sh ``` This will run the same tests that the CI runs and refuse the push if it fails. @@ -214,7 +214,7 @@ In cases where you want to disable automatic formatting for a specific block of ## Verification & Testing ### Running unit tests -Run `make check` to run the unit tests with your current configuration or `./ci/ci-build.sh` to check with different switches passed to configure. +Run `make check` to run the unit tests with your current configuration or `./scripts/build-configuration-matrix.sh` to check with different switches passed to configure. ### Writing unit tests We use the [cmocka](https://cmocka.org/) testing framework for unit tests. @@ -331,7 +331,7 @@ meson compile doublecheck Alternatively, you can run the script directly: ``` -./scripts/quality-check.sh --fix-formatting --meson # or --autotools +./scripts/lint-and-test.sh --fix-formatting --meson # or --autotools ``` ### Pre-commit hook @@ -339,7 +339,7 @@ It is highly recommended to install the quality check script as a git pre-commit To install the hook: ``` -./scripts/quality-check.sh --install +./scripts/lint-and-test.sh --install ``` If you need to bypass the formatting check (e.g. due to a `clang-format` version mismatch), you can set the `SKIP_FORMAT` environment variable: diff --git a/Makefile.am b/Makefile.am index 3423fea4..1ce59239 100644 --- a/Makefile.am +++ b/Makefile.am @@ -376,4 +376,4 @@ spell: codespell doublecheck: - @./scripts/quality-check.sh --fix-formatting --autotools + @./scripts/lint-and-test.sh --fix-formatting --autotools diff --git a/meson.build b/meson.build index d43cd3cb..921aa8a9 100644 --- a/meson.build +++ b/meson.build @@ -727,7 +727,7 @@ if get_option('tests') endif run_target('doublecheck', - command: ['scripts/quality-check.sh', '--fix-formatting', '--meson'] + command: ['scripts/lint-and-test.sh', '--fix-formatting', '--meson'] ) summary({ diff --git a/ci/ci-build.sh b/scripts/build-configuration-matrix.sh similarity index 98% rename from ci/ci-build.sh rename to scripts/build-configuration-matrix.sh index 606732bf..bbb2334e 100755 --- a/ci/ci-build.sh +++ b/scripts/build-configuration-matrix.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +# Exhaustive build configuration matrix testing for Profanity + log_content() { echo diff --git a/scripts/quality-check.sh b/scripts/lint-and-test.sh similarity index 96% rename from scripts/quality-check.sh rename to scripts/lint-and-test.sh index dfda561a..88ed28e0 100755 --- a/scripts/quality-check.sh +++ b/scripts/lint-and-test.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Central quality check script for Profanity +# Central linting and testing script for Profanity set -e @@ -118,7 +118,7 @@ while [[ "$#" -gt 0 ]]; do echo "Installing pre-commit hook..." mkdir -p .git/hooks echo "#!/usr/bin/env bash" > .git/hooks/pre-commit - echo "./scripts/quality-check.sh --hook" >> .git/hooks/pre-commit + echo "./scripts/lint-and-test.sh --hook" >> .git/hooks/pre-commit chmod +x .git/hooks/pre-commit echo "Hook installed." exit 0 @@ -140,4 +140,4 @@ if [ "$BUILD_SYSTEM" != "none" ]; then run_tests "$BUILD_SYSTEM" fi -echo -e "${GREEN}Quality check successful!${NC}" +echo -e "${GREEN}Validation successful!${NC}"