digitalpulp / pre-commit-php

Pre-commit scripts appropiate for *any* PHP project. These hooks are made as custom plugins under the [pre-commit](http://pre-commit.com/#new-hooks) git hook framework.
https://www.digitalpulp.com
Apache License 2.0
54 stars 36 forks source link

php-lint-all doesn't identify problematic files, only that there were some #18

Open posita opened 3 years ago

posita commented 3 years ago

Config:

# .pre-commit-config.yaml
repos:
  - repo: meta
    hooks:
    - id: check-hooks-apply
    - id: check-useless-excludes
  - repo: https://github.com/digitalpulp/pre-commit-php.git
    rev: 1.4.0
    hooks:
    - id: php-lint-all

Output:

% pre-commit run --verbose --all-files
Check hooks apply to the repository......................................Passed
- hook id: check-hooks-apply
- duration: 0.44s
Check for useless excludes...............................................Passed
- hook id: check-useless-excludes
- duration: 0.41s
PHP Syntax Check (Comprehensive).........................................Failed
- hook id: php-lint-all
- duration: 7.74s
- exit code: 1

Begin PHP Linter
Begin PHP Linter
Begin PHP Linter
Begin PHP Linter
Begin PHP Linter
────────────────────────────────────────────────────────────────────────────────
2 PHP Parse error(s) were found!
────────────────────────────────────────────────────────────────────────────────
Begin PHP Linter
Begin PHP Linter
────────────────────────────────────────────────────────────────────────────────
1 PHP Parse error(s) were found!
────────────────────────────────────────────────────────────────────────────────
Begin PHP Linter

It seems like it would be much more useful if the source of the errors were listed.