Skip to content

Commit

Permalink
Post number of Psalm errors
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Nov 8, 2023
1 parent 4f6ffc2 commit d0214bd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions monorepo/scripts/ping-ci-server-with-type-coverage.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,16 @@
$commit = $argv[2] ?? exit(400);
$branch = $argv[3] ?? 'master';

if (file_exists('psalmout.txt')) {
// Count the number of errors in the output
$psalmErrors = substr_count(file_get_contents('psalmout.txt'), 'ERROR: ');
}

$data = [
'commit' => $commit,
'report' => file_get_contents('type-coverage.json') ?? exit(404),
'branch' => $branch,
'psalmErrors' => $psalmErrors ?? null,
];

$url = 'https://ci.hydephp.com/api/github/actions/type-coverage';
Expand Down

0 comments on commit d0214bd

Please sign in to comment.