@@ -80,6 +80,14 @@ warden env exec php-fpm ./vendor/space48/magento2-code-quality/script/install.sh
8080vendor/bin/grumphp git:init
8181```
8282
83+ Create ` .git ` folder in warden:
84+
85+ (_ You can mount .git volume from host to inside container instead, but ` grumphp ` only requires empty .git folder,
86+ no much sense in syncronizing all .git/* files adding even more overhead for mutagen._ )
87+ ``` shell
88+ warden env exec php-fpm /bin/bash -c ' [ -d .git ] || mkdir .git'
89+ ```
90+
8391Add configuration files to git:
8492``` shell
8593git add ruleset.xml phpmd.xml .eslintrc .stylelintrc grumphp.yml
@@ -90,6 +98,7 @@ git add ruleset.xml phpmd.xml .eslintrc .stylelintrc grumphp.yml
9098linters-init : # init linters on local machine
9199 warden env exec php-fpm chmod +x vendor/space48/magento2-code-quality/script/install.sh
92100 warden env exec php-fpm ./vendor/space48/magento2-code-quality/script/install.sh
101+ warden env exec php-fpm /bin/bash -c ' [ -d .git ] || mkdir .git'
93102 vendor/bin/grumphp git:init
94103
95104analyse : # analyses all code from starting commit hash to HEAD
@@ -112,7 +121,8 @@ Commit updated composer files, vendor folder, code-quality config files from the
112121# ## Installation on any other Magento 2 project:
1131221. add module `space48/code-quality` via Composer
1141232. run `vendor/space48/code-quality/script/install.sh` script to copy necessary files and install npm packages
115- 3. run `vendor/bin/grumphp git :init` to update precommit hooks
124+ 3. in `grumphp.yml` remove configs marked as `(remove on non warden environment)`
125+ 4. run `vendor/bin/grumphp git :init` to update precommit hooks
116126
117127# # Configuration
118128
0 commit comments