Closed pushrbx closed 2 years ago
I think the error is related to something else.
Output structure of ./vendor/bin/parallel-lint --no-colors --no-progress --json .
:
{
"phpVersion": 80019,
"hhvmVersion": "",
"parallelJobs": 10,
"results": {
"checkedFiles": [],
"filesWithSyntaxError": [],
"skippedFiles": [],
"errors": []
}
}
The error message you see there says Undefined array key "results"
which means results
are missing from the decoded JSON.
If you run ./.github/workflows/utilities/lint-push 97dee621
then inside the script $files
will contain []
and the output of parallel-lint
will be:
{
"type": "JakubOnderka\\PhpParallelLint\\NotExistsPathException",
"message": "Path '' not found",
"code":0
}
The simplest fix would be to run parallel-lint --no-colors --no-progress --json ./src ./test
. I think we can live with that extra 1 second of CI time which is caused by linting all files instead of linting only changed files.
Currently the linting bit is failing in github actions, because from the decoded json the "results" is an array, but it's treated as an object.