Problem/Motivation

We should output the PHPStan fails in the log as well as the code quality section. Also we can update the baseline and offer it as an artifact.

Proposed resolution

The way contrib runs PHPStan is nice. See https://git.drupalcode.org/project/gitlab_templates/-/blob/1.0.x/include...

Remaining tasks

PHPStan test performance

I think the performance of the PHPStan job varies quite a bit.

Example runs:

User interface changes

N/a

API changes

N/a

Data model changes

N/a

Release notes snippet

N/a

Issue fork drupal-3403653

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

alexpott created an issue. See original summary.

alexpott’s picture

Status: Active » Needs review
alexpott’s picture

Issue summary: View changes
alexpott’s picture

Issue summary: View changes
alexpott’s picture

Issue summary: View changes

Updated it so we only store a new baseline in the artifacts when there is an error.

longwave’s picture

Status: Needs review » Needs work

Minor fix needed to avoid wasting CPU when PHPStan is successful.

alexpott’s picture

Status: Needs work » Needs review

Great point @longwave - fixed

alexpott’s picture

Issue summary: View changes

Updated links to successful and unsuccessful runs.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Perfect timing, when I was reviewing #3386841: Reconcile gitlab lint jobs and commit-code-check.sh I was confused why this php static analysis was failing but not showing anything.

  • longwave committed 7e998354 on 10.2.x
    Issue #3403653 by alexpott, longwave: Incorporate improvements to how...

  • longwave committed f5223a38 on 11.x
    Issue #3403653 by alexpott, longwave: Incorporate improvements to how...
longwave’s picture

Status: Reviewed & tested by the community » Fixed

Not convinced of the value of the junit output, it's not very helpful in the GitLab CI, but still it can't harm anything.

Committed and pushed f5223a3852 to 11.x and 7e9983545d to 10.2.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.