Skip to content

Commit

Permalink
Add static analyser workflow (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
DerManoMann authored Nov 9, 2024
1 parent 2193970 commit 87ac487
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 90 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: static-analysis

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
static-analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
name: Checkout repository

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'

- uses: ramsey/composer-install@v3
with:
dependency-versions: 'highest'

- name: Static Code Analysis
run: composer analyse
90 changes: 0 additions & 90 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,6 @@ parameters:
count: 1
path: tests/Adapters/LaravelAdapterTest.php

-
message: "#^Function OpenApi\\\\scan not found\\.$#"
count: 1
path: tests/Adapters/LaravelAdapterTest.php

-
message: "#^If condition is always true\\.$#"
count: 1
Expand All @@ -140,86 +135,6 @@ parameters:
count: 1
path: tests/Adapters/LaravelAdapterTest.php

-
message: "#^Access to an undefined property Radebatz\\\\OpenApi\\\\Verifier\\\\Tests\\\\Adapters\\\\Slim3AdapterTest\\:\\:\\$app\\.$#"
count: 1
path: tests/Adapters/Slim3AdapterTest.php

-
message: "#^Access to an undefined property Radebatz\\\\OpenApi\\\\Verifier\\\\Tests\\\\Adapters\\\\Slim3AdapterTest\\:\\:\\$openapiSpecification\\.$#"
count: 3
path: tests/Adapters/Slim3AdapterTest.php

-
message: "#^Call to method add\\(\\) on an unknown class Slim\\\\App\\.$#"
count: 1
path: tests/Adapters/Slim3AdapterTest.php

-
message: "#^Call to method get\\(\\) on an unknown class Slim\\\\App\\.$#"
count: 1
path: tests/Adapters/Slim3AdapterTest.php

-
message: "#^Call to method getContainer\\(\\) on an unknown class Slim\\\\App\\.$#"
count: 1
path: tests/Adapters/Slim3AdapterTest.php

-
message: "#^Call to method process\\(\\) on an unknown class Slim\\\\App\\.$#"
count: 1
path: tests/Adapters/Slim3AdapterTest.php

-
message: "#^Call to static method createFromEnvironment\\(\\) on an unknown class Slim\\\\Http\\\\Request\\.$#"
count: 1
path: tests/Adapters/Slim3AdapterTest.php

-
message: "#^Call to static method mock\\(\\) on an unknown class Slim\\\\Http\\\\Environment\\.$#"
count: 1
path: tests/Adapters/Slim3AdapterTest.php

-
message: "#^Function OpenApi\\\\scan not found\\.$#"
count: 1
path: tests/Adapters/Slim3AdapterTest.php

-
message: "#^If condition is always true\\.$#"
count: 1
path: tests/Adapters/Slim3AdapterTest.php

-
message: "#^Instantiated class Slim\\\\App not found\\.$#"
count: 1
path: tests/Adapters/Slim3AdapterTest.php

-
message: "#^Instantiated class Slim\\\\Http\\\\Response not found\\.$#"
count: 1
path: tests/Adapters/Slim3AdapterTest.php

-
message: "#^Negated boolean expression is always false\\.$#"
count: 1
path: tests/Adapters/Slim3AdapterTest.php

-
message: "#^PHPDoc tag @var for variable \\$app contains unknown class Slim\\\\App\\.$#"
count: 1
path: tests/Adapters/Slim3AdapterTest.php

-
message: "#^Parameter \\$app of method Radebatz\\\\OpenApi\\\\Verifier\\\\Tests\\\\Adapters\\\\Slim3AdapterTest\\:\\:registerOpenApiVerifier\\(\\) has invalid type Slim\\\\App\\.$#"
count: 1
path: tests/Adapters/Slim3AdapterTest.php

-
message: "#^Ternary operator condition is always false\\.$#"
count: 1
path: tests/Adapters/Slim3AdapterTest.php

-
message: "#^Access to an undefined property Radebatz\\\\OpenApi\\\\Verifier\\\\Tests\\\\Adapters\\\\Slim4AdapterTest\\:\\:\\$app\\.$#"
count: 1
Expand Down Expand Up @@ -255,11 +170,6 @@ parameters:
count: 1
path: tests/Adapters/Slim4AdapterTest.php

-
message: "#^Function OpenApi\\\\scan not found\\.$#"
count: 1
path: tests/Adapters/Slim4AdapterTest.php

-
message: "#^If condition is always true\\.$#"
count: 1
Expand Down

0 comments on commit 87ac487

Please sign in to comment.