Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/autocheckers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion apps/profile/templates/404-profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/** @var \OCP\Defaults $theme */
// @codeCoverageIgnoreStart
if (!isset($_)) { //standalone page is not supported anymore - redirect to /
require_once '../../lib/base.php';
require_once '../../../lib/base.php';

$urlGenerator = \OCP\Server::get(\OCP\IURLGenerator::class);
header('Location: ' . $urlGenerator->getAbsoluteURL('/'));
Expand Down
31 changes: 31 additions & 0 deletions build/psalm-checker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/sh

# SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: AGPL-3.0-or-later

if [ -d "dist" ]; then
missing=''
for app in apps/*; do
if git check-ignore "$app" -q ; then
echo "ℹ️ Ignoring non shipped app: $app"
continue
fi

grep "directory name=\"$app\"" psalm.xml 2>&1 > /dev/null
if [ $? -ne 0 ]; then
missing="$missing - $app\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

1 change: 1 addition & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"/>
Expand Down
Loading