diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2025-04-04 16:56:02 +0200 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2025-04-07 14:40:37 +0200 |
commit | 4a64cf54bab1e5ec41aae6a7097873587fe682db (patch) | |
tree | acfbf4aab4a366b81c5ee08670edfc744251bf69 | |
parent | 1e8870e3f8ff6ccf7c75d3de23ee270b7ea4f1f7 (diff) | |
download | nextcloud-server-4a64cf54bab1e5ec41aae6a7097873587fe682db.tar.gz nextcloud-server-4a64cf54bab1e5ec41aae6a7097873587fe682db.zip |
ci: test that all apps are enabled for psalm
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
-rw-r--r-- | .github/workflows/autocheckers.yml | 3 | ||||
-rwxr-xr-x | build/psalm-checker.sh | 26 | ||||
-rw-r--r-- | psalm.xml | 1 |
3 files changed, 30 insertions, 0 deletions
diff --git a/.github/workflows/autocheckers.yml b/.github/workflows/autocheckers.yml index 1c7dcc014d0..75f9f62d80e 100644 --- a/.github/workflows/autocheckers.yml +++ b/.github/workflows/autocheckers.yml @@ -110,6 +110,9 @@ jobs: - name: Check that all and only expected files are included run: php ./build/files-checker.php + - name: Check that all shipped apps are linted by psalm + run: sh ./build/psalm-checker.sh + summary: permissions: contents: none diff --git a/build/psalm-checker.sh b/build/psalm-checker.sh new file mode 100755 index 00000000000..f0288269bc4 --- /dev/null +++ b/build/psalm-checker.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +# SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: AGPL-3.0-or-later + +if [ -d "dist" ]; then + missing='' + for f in apps/*; do + grep "directory name=\"$f\"" psalm.xml 2>&1 > /dev/null + if [ $? -ne 0 ]; then + missing="$missing- $f\n" + fi + done + + if [ "$missing" = "" ]; then + echo "✅ All apps will be linted by psalm" + else + echo "❌ Following apps are not setup for linting using psalm:" + echo -e "$missing" + exit 1 + fi +else + echo "⚠️ This script needs to be executed from the root of the repository" + exit 1 +fi + diff --git a/psalm.xml b/psalm.xml index 0fdbc287b5a..5952ac50463 100644 --- a/psalm.xml +++ b/psalm.xml @@ -36,6 +36,7 @@ <directory name="apps/files_versions"/> <directory name="apps/lookup_server_connector"/> <directory name="apps/oauth2"/> + <directory name="apps/profile"/> <directory name="apps/provisioning_api"/> <directory name="apps/settings"/> <directory name="apps/sharebymail"/> |