grumphp
grumphp copied to clipboard
tasks has running twice
| Q | A |
|---|---|
| Version | 2.7.0 |
| Bug? | yes |
| New feature? | no |
| Question? | no |
| Documentation? | no |
| Related tickets |
Good evening,
When I run Grumphp when I want to commit code, the tasks run twice.
However, when I launch it in my docker container (PHP 8.1), the tasks are launched only once.
Do you have any idea?
Thanks
My configuration
grumphp:
hooks_dir: ~
hooks_preset: local
git_hook_variables:
EXEC_GRUMPHP_COMMAND: 'docker-compose exec mact-php php'
stop_on_failure: false
ignore_unstaged_changes: true
hide_circumvention_tip: false
process_timeout: 300
ascii:
failed: failed.txt
succeeded: succeeded.txt
parallel:
enabled: true
tasks:
shell:
metadata:
label: "generating cache npyppu (shell)"
blocking: true
scripts:
- [ "-c", "if [ ! -d var/cache/dev ]; then bin/console --env=dev -q; fi" ]
composer:
metadata:
label: "check composer.json if needed (composer)"
file: ./composer.json
no_check_all: false
no_check_lock: false
no_check_publish: false
no_local_repository: false
with_dependencies: false
strict: false
git_blacklist:
metadata:
label: "check blacklist words (git_blacklist)"
keywords:
- "die("
- "var_dump()"
- "exit;"
whitelist_patterns: [ ]
triggered_by: [ 'php' ]
regexp_type: G
git_commit_message:
metadata:
label: "check commit message (git_commit_message)"
allow_empty_message: false
enforce_capitalized_subject: false
enforce_no_subject_punctuations: false
enforce_no_subject_trailing_period: true
enforce_single_lined_subject: true
max_body_width: 72
max_subject_width: 120
matchers:
Please respect commit message convention: /^(revert|feat|fix|docs|style|refactor|perf|test|chore|ci)(!)?(\(.+\))?(:)+( ).{1,50}|^Merge .*/
case_insensitive: false
phpcsfixer2:
metadata:
label: "check if all php's files are syntactically valid (phpcsfixer2)"
cache_file: ".php_cs.cache"
config: ".php-cs-fixer.dist.php"
phpstan:
metadata:
label: "finding errors in code (phpstan)"
autoload_file: "./vendor/autoload.php"
configuration: "./phpstan.neon"
level: 4
force_patterns: [ ]
triggered_by: [ 'php' ]
memory_limit: "-1"
ignore_patterns: [ 'vendor','DoctrineMigrations', 'Fixture', 'tests', 'scripts', 'app' ]
phpversion:
metadata:
label: "verify php's version (phpversion)"
project: "8.1"
jsonlint:
metadata:
label: "check all json's files for syntax erros (jsonlint)"
yamllint:
metadata:
label: "check all yaml's files for syntax erros (yamllint)"
securitychecker_symfony:
lockfile: ./composer.lock
format: ~
run_always: true
phplint:
metadata:
label: "check all php's files for syntax erros (phplint)"
exclude: [ 'vendor' ]
Steps to reproduce:
cd "./" && printf "%s\n" "${DIFF}" | docker-compose exec -T mact-php php 'vendor/bin/grumphp' 'git:pre-commit' '--skip-success-output'
Result:
GrumPHP detected a pre-commit command.
GrumPHP is sniffing your code!
Running tasks with priority 0!
==============================
Running task 1/10: generating cache npyppu (shell)...
Running task 2/10: check composer.json if needed (composer)...
Running task 3/10: check blacklist words (git_blacklist)...
Running task 4/10: check if all php's files are syntactically valid (phpcsfixer2)...
Running task 5/10: finding errors in code (phpstan)...
Running task 6/10: verify php's version (phpversion)...
Running task 7/10: check all json's files for syntax erros (jsonlint)...
Running task 8/10: check all yaml's files for syntax erros (yamllint)...
Running task 9/10: securitychecker_symfony...
Running task 10/10: check all php's files for syntax erros (phplint)...
Running task 1/10: generating cache npyppu (shell)...
Running task 2/10: check composer.json if needed (composer)...
Running task 3/10: check blacklist words (git_blacklist)...
Running task 4/10: check if all php's files are syntactically valid (phpcsfixer2)...
Running task 5/10: finding errors in code (phpstan)...
Running task 6/10: verify php's version (phpversion)... ✔
Running task 7/10: check all json's files for syntax erros (jsonlint)...
Running task 8/10: check all yaml's files for syntax erros (yamllint)... ✔
Running task 9/10: securitychecker_symfony... ✔
Running task 10/10: check all php's files for syntax erros (phplint)...
GrumPHP detected a commit-msg command.
GrumPHP is sniffing your code!
Running tasks with priority 0!
==============================
Running task 1/1: check commit message (git_commit_message)...
Running task 1/1: check commit message (git_commit_message)... ✔
███████╗██╗ ██╗ ██████╗ ██████╗███████╗███████╗██████╗ ███████╗██████╗
██╔════╝██║ ██║██╔════╝██╔════╝██╔════╝██╔════╝██╔══██╗██╔════╝██╔══██╗
███████╗██║ ██║██║ ██║ █████╗ █████╗ ██║ ██║█████╗ ██║ ██║
╚════██║██║ ██║██║ ██║ ██╔══╝ ██╔══╝ ██║ ██║██╔══╝ ██║ ██║
███████║╚██████╔╝╚██████╗╚██████╗███████╗███████╗██████╔╝███████╗██████╔╝
╚══════╝ ╚═════╝ ╚═════╝ ╚═════╝╚══════╝╚══════╝╚═════╝ ╚══════╝╚═════╝
[ci/optimize-sonar-grumphp 1195a28] ci: optimize ci
3 files changed, 8 insertions(+), 8 deletions(-)