Skip to content

pre-commit run --verbose --all-files results in multiple, redundant runs of php-unit, php-cs, etc. #21

Description

@posita
% git status
On branch [branch]
Your branch is up to date with '[branch]'.

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
  [4 changed files]

% pre-commit run --verbose --all-files
…
PHP Unit.................................................................Failed
- hook id: php-unit
- duration: 0.81s
- exit code: 1

Begin PHP Unit Task Runner
Running command  vendor/bin/phpunit
────────────────────────────────────────────────────────────────────────────────
Failures detected in unit tests...
────────────────────────────────────────────────────────────────────────────────
PHPUnit 9.5.10 by Sebastian Bergmann and contributors.

Runtime:       PHP 7.3.11
Configuration: /…/phpunit.xml
Warning:       No code coverage driver available

F                                                                   1 / 1 (100%)

Time: 00:00.515, Memory: 6.00 MB

There was 1 failure:

1) dummyTest::test_Dummy
Failed asserting that 1 matches expected 0.

/…/tests/dummyTest.php:6

FAILURES!
Tests: 1, Assertions: 1, Failures: 1.
Begin PHP Unit Task Runner
Running command  vendor/bin/phpunit
────────────────────────────────────────────────────────────────────────────────
Failures detected in unit tests...
────────────────────────────────────────────────────────────────────────────────
PHPUnit 9.5.10 by Sebastian Bergmann and contributors.

Runtime:       PHP 7.3.11
Configuration: /…/phpunit.xml
Warning:       No code coverage driver available

F                                                                   1 / 1 (100%)

Time: 00:00.516, Memory: 6.00 MB

There was 1 failure:

1) dummyTest::test_Dummy
Failed asserting that 1 matches expected 0.

/…/tests/dummyTest.php:6

FAILURES!
Tests: 1, Assertions: 1, Failures: 1.
Begin PHP Unit Task Runner
Running command  vendor/bin/phpunit
────────────────────────────────────────────────────────────────────────────────
Failures detected in unit tests...
────────────────────────────────────────────────────────────────────────────────
PHPUnit 9.5.10 by Sebastian Bergmann and contributors.

Runtime:       PHP 7.3.11
Configuration: /…/phpunit.xml
Warning:       No code coverage driver available

F                                                                   1 / 1 (100%)

Time: 00:00.514, Memory: 6.00 MB

There was 1 failure:

1) dummyTest::test_Dummy
Failed asserting that 1 matches expected 0.

/…/tests/dummyTest.php:6

FAILURES!
Tests: 1, Assertions: 1, Failures: 1.
Begin PHP Unit Task Runner
Running command  vendor/bin/phpunit
────────────────────────────────────────────────────────────────────────────────
Failures detected in unit tests...
────────────────────────────────────────────────────────────────────────────────
PHPUnit 9.5.10 by Sebastian Bergmann and contributors.

Runtime:       PHP 7.3.11
Configuration: /…/phpunit.xml
Warning:       No code coverage driver available

F                                                                   1 / 1 (100%)

Time: 00:00.516, Memory: 6.00 MB

There was 1 failure:

1) dummyTest::test_Dummy
Failed asserting that 1 matches expected 0.

/…/tests/dummyTest.php:6

FAILURES!
Tests: 1, Assertions: 1, Failures: 1.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions