Closed FedOken closed 4 years ago
Run doesn't always behave exactly the same as pre-commit.
Both tasks for php-cs-fixer and psalm don't specify any files on the CLI during 'run'. Only on pre-commit, files are added to the command.
Reference:
Therefore, you'll get other results based on what command you run - even if you pass in a list of changed files.
So, how I can run only php-cs-fixer job (--tasks=phpcsfixer) in my CI? This job shoud check only diff files.
My configuration
Problem: Stdin input for "run" command for jobs: psalm, phpcsfixer; don't work. 1) Step one, get diff.
2) Run pre-commit for stdin diff input:
Result:
All is fine, we get error from file what in diff.
3) Letss try run for stdin input
As you can see, we steel have one error for phpcs and all project errors for phpcsfixer, how to fix it?
Or how to run with
--tasks=phpcsfixer
and it show me error only in my diff?