-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: provokateurin <kate@provokateurin.de>
- Loading branch information
1 parent
e9f47a7
commit d4213b4
Showing
8 changed files
with
2,261 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
# This workflow is provided via the organization template repository | ||
# | ||
# https://github.com/nextcloud/.github | ||
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization | ||
# | ||
# SPDX-FileCopyrightText: 2022-2024 Nextcloud GmbH and Nextcloud contributors | ||
# SPDX-License-Identifier: MIT | ||
|
||
name: Static analysis | ||
|
||
on: pull_request | ||
|
||
concurrency: | ||
group: psalm-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
matrix: | ||
runs-on: ubuntu-latest-low | ||
outputs: | ||
ocp-matrix: ${{ steps.versions.outputs.ocp-matrix }} | ||
steps: | ||
- name: Checkout app | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: Get version matrix | ||
id: versions | ||
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1 | ||
|
||
- name: Check enforcement of minimum PHP version ${{ steps.versions.outputs.php-min }} in psalm.xml | ||
run: grep 'phpVersion="${{ steps.versions.outputs.php-min }}' psalm.xml | ||
|
||
static-analysis: | ||
runs-on: ubuntu-latest | ||
needs: matrix | ||
strategy: | ||
# do not stop on another job's failure | ||
fail-fast: false | ||
matrix: ${{ fromJson(needs.matrix.outputs.ocp-matrix) }} | ||
|
||
name: static-psalm-analysis ${{ matrix.ocp-version }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: Set up php${{ matrix.php-versions }} | ||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite | ||
coverage: none | ||
ini-file: development | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
composer remove nextcloud/ocp --dev | ||
composer i | ||
- name: Install dependencies # zizmor: ignore[template-injection] | ||
run: composer require --dev 'nextcloud/ocp:${{ matrix.ocp-version }}' --ignore-platform-reqs --with-dependencies | ||
|
||
- name: Run coding standards check | ||
run: composer run psalm -- --threads=1 --monochrome --no-progress --output-format=github | ||
|
||
summary: | ||
runs-on: ubuntu-latest-low | ||
needs: static-analysis | ||
|
||
if: always() | ||
|
||
name: static-psalm-analysis-summary | ||
|
||
steps: | ||
- name: Summary status | ||
run: if ${{ needs.static-analysis.result != 'success' }}; then exit 1; fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,6 @@ | |
/.php_cs.cache | ||
/build | ||
/node_modules | ||
/vendor/ | ||
vendor/ | ||
.idea/ | ||
.php-cs-fixer.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<files psalm-version="5.26.1@d747f6500b38ac4f7dfc5edbcae6e4b637d7add0"> | ||
<file src="lib/AppInfo/Application.php"> | ||
<UndefinedClass> | ||
<code><![CDATA[LoadAdditionalScriptsEvent]]></code> | ||
</UndefinedClass> | ||
</file> | ||
<file src="lib/Listeners/FilesLoadAdditionalScriptsListener.php"> | ||
<MissingTemplateParam> | ||
<code><![CDATA[IEventListener]]></code> | ||
</MissingTemplateParam> | ||
<UndefinedClass> | ||
<code><![CDATA[LoadAdditionalScriptsEvent]]></code> | ||
</UndefinedClass> | ||
</file> | ||
<file src="lib/Service/RecentlyCommentedFilesSource.php"> | ||
<MissingDependency> | ||
<code><![CDATA[$this->rootFolder]]></code> | ||
<code><![CDATA[IRootFolder]]></code> | ||
<code><![CDATA[IRootFolder]]></code> | ||
</MissingDependency> | ||
</file> | ||
<file src="lib/Service/RecentlyEditedFilesSource.php"> | ||
<MissingDependency> | ||
<code><![CDATA[$rootFolder]]></code> | ||
<code><![CDATA[$rootFolder]]></code> | ||
<code><![CDATA[IRootFolder]]></code> | ||
</MissingDependency> | ||
</file> | ||
<file src="lib/Service/RecentlySharedFilesSource.php"> | ||
<MissingDependency> | ||
<code><![CDATA[$this->rootFolder]]></code> | ||
<code><![CDATA[IRootFolder]]></code> | ||
<code><![CDATA[IRootFolder]]></code> | ||
</MissingDependency> | ||
</file> | ||
</files> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0"?> | ||
<psalm | ||
errorLevel="4" | ||
phpVersion="8.1" | ||
resolveFromConfigFile="true" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns="https://getpsalm.org/schema/config" | ||
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" | ||
errorBaseline="psalm-baseline.xml" | ||
findUnusedBaselineEntry="true" | ||
findUnusedCode="false" | ||
> | ||
<projectFiles> | ||
<directory name="lib" /> | ||
<ignoreFiles> | ||
<directory name="vendor" /> | ||
</ignoreFiles> | ||
</projectFiles> | ||
<extraFiles> | ||
<directory name="vendor" /> | ||
</extraFiles> | ||
</psalm> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"config": { | ||
"platform": { | ||
"php": "8.1" | ||
} | ||
}, | ||
"require-dev": { | ||
"vimeo/psalm": "^5.26" | ||
} | ||
} |
Oops, something went wrong.