Closed redthor closed 6 years ago
Part of my issues appears to be due to git_dir
parameter being the folder where the .git
folder is found as opposed to the actual .git
folder. Removing .git
helped a bit.
In the future it'd be good if git_dir
meant the "git directory" :)
Thanks for GrumPHP!
I'm setting up for the first time and I just wanted to get some feedback on GrumPHP and applicability with the mono -> many repo structure enabled by https://github.com/splitsh/lite and https://github.com/jderusse/docker-gitsplit
It simply might not be suitable, but you might have some feedback or ideas for me, hence this ticket.
Given this structure:
I added
"phpro/grumphp"
intoprojectA/composer.json
and GrumPHP createdprojectA/.git
and added the hooks in there instead of adding it tomono/.git/
. The fix might be to look recursively up the folder tree for.git/
and and use that one instead. However I then realised there were other problems with my setup.You can set GrumPHP config to look at the right
.git/
folder:Then run GrumPHP from the
projectA
folder:The issue is that it appears to prefix CWD to the files it finds with
ls-files
. Also,ls-files
is returning all files from all project folders. It then passes to the Task, e.g.phpmd
, which then complains the files cannot be found:I could look into a solution for this, but I did wonder, what should I expect my commit includes changes in
projectB
? I wasn't sure of the answer given it might have it's ownprojectB/grumphp.yml
... One could have a warning "only checking files descending from grumphp.yml"So to summarise:
.git
folder on initialisation;grumphp.yml
;