ci: Improve usability of running different psalm modes locally

Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/48476/head
Joas Schilling 2 months ago
parent 99d507c259
commit 95bafb4980
No known key found for this signature in database
GPG Key ID: F72FA5B49FFA96B0
  1. 6
      .github/workflows/static-code-analysis.yml
  2. 1
      .gitignore
  3. 3
      composer.json

@ -34,7 +34,7 @@ jobs:
run: composer i
- name: Psalm
run: composer run psalm:ci -- --monochrome --no-progress --output-format=github --update-baseline --report=results.sarif
run: composer run psalm -- --threads=1 --monochrome --no-progress --output-format=github --update-baseline --report=results.sarif
- name: Show potential changes in Psalm baseline
if: always()
@ -66,7 +66,7 @@ jobs:
run: composer i
- name: Psalm taint analysis
run: composer run psalm:ci -- --monochrome --no-progress --output-format=github --report=results.sarif --taint-analysis --ignore-baseline
run: composer run psalm:security -- --threads=1 --monochrome --no-progress --output-format=github --report=results.sarif
- name: Upload Security Analysis results to GitHub
if: always()
@ -96,7 +96,7 @@ jobs:
run: composer i
- name: Psalm
run: composer run psalm:ci -- -c psalm-ocp.xml --monochrome --no-progress --output-format=github --update-baseline
run: composer run psalm:ocp -- --threads=1 --monochrome --no-progress --output-format=github --update-baseline
- name: Show potential changes in Psalm baseline
if: always()

1
.gitignore vendored

@ -151,6 +151,7 @@ Vagrantfile
# Tests - auto-generated files
/data-autotest
/results.sarif
/tests/.phpunit.result.cache
/tests/coverage*
/tests/css

@ -59,7 +59,8 @@
"cs:check": "php-cs-fixer fix --dry-run --diff",
"lint": "find . -name \\*.php -not -path './lib/composer/*' -not -path './build/stubs/*' -print0 | xargs -0 -n1 php -l",
"psalm": "psalm --no-cache --threads=$(nproc)",
"psalm:ci": "psalm --no-cache --threads=1",
"psalm:ocp": "psalm --no-cache --threads=$(nproc) -c psalm-ocp.xml",
"psalm:security": "psalm --no-cache --threads=$(nproc) --taint-analysis --ignore-baseline",
"psalm:update-baseline": "psalm --no-cache --threads=$(nproc) --update-baseline",
"serve": [
"Composer\\Config::disableProcessTimeout",

Loading…
Cancel
Save