Skip to content

Commit

Permalink
Merge pull request #1108 from nextcloud/static/analysis-stable24
Browse files Browse the repository at this point in the history
[stable24] Add psalm
  • Loading branch information
CarlSchwan authored Jul 25, 2022
2 parents c4cd279 + 3ed2cdd commit af03549
Show file tree
Hide file tree
Showing 6 changed files with 2,796 additions and 5 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Static analysis

on: [pull_request]

jobs:
static-psalm-analysis:
runs-on: ubuntu-latest
strategy:
matrix:
ocp-version: [ 'dev-stable24' ]
name: Nextcloud ${{ matrix.ocp-version }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up php
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
tools: composer:v1
coverage: none
- name: Install dependencies
run: composer i
- name: Install dependencies
run: composer require --dev christophwurst/nextcloud:${{ matrix.ocp-version }}
- name: Run coding standards check
run: composer run psalm
10 changes: 8 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,16 @@
"scripts": {
"cs:check": "php-cs-fixer fix --dry-run --diff",
"cs:fix": "php-cs-fixer fix",
"lint": "find . -name \\*.php -not -path './vendor/*' -print0 | xargs -0 -n1 php -l"
"lint": "find . -name \\*.php -not -path './vendor/*' -print0 | xargs -0 -n1 php -l",
"psalm": "psalm --threads=1 --update-baseline",
"psalm:update-baseline": "psalm --threads=1 --update-baseline",
"psalm:clear": "psalm --clear-cache && psalm --clear-global-cache",
"psalm:fix": "psalm --alter --issues=InvalidReturnType,InvalidNullableReturnType,MissingParamType,InvalidFalsableReturnType"
},
"require-dev": {
"vimeo/psalm": "^4.24",
"nextcloud/coding-standard": "^0.5.0",
"phpunit/phpunit": "^9.5"
"phpunit/phpunit": "^9.5",
"christophwurst/nextcloud": "dev-stable24"
}
}
Loading

0 comments on commit af03549

Please sign in to comment.