Since grumphp doesn't always finish all checks (stuck without response) on my local windows mashine I decided to run grumphp checks manual local and to get all the checks on any commit I added grumphp to my github actions.
Due to the nature of my project (symfony based) I don't want to change/correct all errors found on the base-files, so I used to exclude some dirs and files.
When I run the check localy I recieve an "all good!", on github actions violations are found, as you can see here with
FILE: /home/runner/work/website/website/src/Kernel.php14 | VIOLATION | Avoid assigning values to variables in if clauses and the like (line '22', column '27').27 | VIOLATION | Avoid assigning values to variables in if clauses and the like (line '34', column '27').
as you will see, this file should be excluded by config
My configuration
the full file can be seen here the intressting part is
# local
./vendor/bin/grumphp run --tasks phpmd
# github actions, see at the action :-)
- name: "Run GrumPHP"
run: "php vendor/bin/grumphp run --no-interaction"
Result:
Run php vendor/bin/grumphp run --no-interaction
GrumPHP is sniffing your code!
Running tasks with priority 0!
==============================
FILE: /home/runner/work/website/website/src/Kernel.php
------------------------------------------------------
14 | VIOLATION | Avoid assigning values to variables in if clauses and the like (line '22', column '27').
27 | VIOLATION | Avoid assigning values to variables in if clauses and the like (line '34', column '27').
Found 2 violations and 0 errors in 267ms
To skip commit checks, add -n or --no-verify flag to commit command
Since grumphp doesn't always finish all checks (stuck without response) on my local windows mashine I decided to run grumphp checks manual local and to get all the checks on any commit I added grumphp to my github actions. Due to the nature of my project (symfony based) I don't want to change/correct all errors found on the base-files, so I used to exclude some dirs and files. When I run the check localy I recieve an "all good!", on github actions violations are found, as you can see here with
FILE: /home/runner/work/website/website/src/Kernel.php
14 | VIOLATION | Avoid assigning values to variables in if clauses and the like (line '22', column '27').
27 | VIOLATION | Avoid assigning values to variables in if clauses and the like (line '34', column '27').
as you will see, this file should be excluded by configMy configuration the full file can be seen here the intressting part is
Steps to reproduce:
Result:
https://github.com/Wayfapper/website/runs/2432199461?check_suite_focus=true