Skip to content

Commit

Permalink
Enhancement: Run static code analysis with vimeo/psalm (#232)
Browse files Browse the repository at this point in the history
* Enhancement: Run static code analysis with vimeo/psalm

* Fix: Regenerate baseline for vimeo/psalm
  • Loading branch information
localheinz authored Apr 28, 2022
1 parent 95a1044 commit cdcd09f
Show file tree
Hide file tree
Showing 8 changed files with 1,897 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@
/box.json.dist export-ignore
/composer-require-checker.json export-ignore
/phpunit.xml.dist export-ignore
/psalm-baseline.xml export-ignore
/psalm.xml export-ignore
26 changes: 26 additions & 0 deletions .github/workflows/integrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,32 @@ jobs:
- name: "Run maglnet/composer-require-checker"
run: ".phive/composer-require-checker check --config-file=$(pwd)/composer-require-checker.json"

static-code-analysis:
name: "Static Code Analysis"

runs-on: "ubuntu-latest"

strategy:
matrix:
php-version:
- "7.4"

steps:
- name: "Checkout"
uses: "actions/checkout@v3"

- name: "Set up PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"

- name: "Install dependencies with composer"
run: "composer install --ansi --no-progress"

- name: "Run vimeo/psalm"
run: ".phive/psalm --config=psalm.xml --output-format=github --shepherd --show-info=false --stats --threads=4"

tests:
name: "Tests"

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/.build/
/vendor/
/.php-cs-fixer.cache
/.phpunit.result.cache
Expand Down
1 change: 1 addition & 0 deletions .phive/phars.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
<phive xmlns="https://phar.io/phive">
<phar name="php-cs-fixer" version="^3.8.0" installed="3.8.0" location="./.phive/php-cs-fixer" copy="true"/>
<phar name="composer-require-checker" version="^3.8.0" installed="3.8.0" location="./.phive/composer-require-checker" copy="true"/>
<phar name="psalm" version="^4.22.0" installed="4.22.0" location="./.phive/psalm" copy="true"/>
</phive>
Binary file added .phive/psalm
Binary file not shown.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![Integrate](https://github.com/friendsoftwig/twigcs/workflows/Integrate/badge.svg)](https://github.com/friendsoftwig/twigcs/actions)

[![Code Coverage](https://codecov.io/github/friendsoftwig/twigcs/branch/main/graph/badge.svg)](https://codecov.io/github/friendsoftwig/twigcs)
[![Type Coverage](https://shepherd.dev/github/friendsoftwig/twigcs/coverage.svg)](https://shepherd.dev/github/friendsoftwig/twigcs)

The missing checkstyle for twig!

Expand Down
Loading

0 comments on commit cdcd09f

Please sign in to comment.