The max_body_witdth check for git commit messages should exclude lines starting with #. These are comments that do not end up in the commit and often are automatically generated with long lines, for example in merge commits or with a localized git installation.
# Generate empty folder
mkdir tmp
cd tmp
git init
echo "vendor" > .gitignore
pbpaste > grumphp.yml
composer require --dev phpro/grumphp
# Your actions
git commit --allow-empty -m "Test
# this looks like a long line, but it won't actually end up in the commit. I am writing random stuff now to reach the limit. Knowledge is power, France is bacon.
"
The
max_body_witdth
check for git commit messages should exclude lines starting with#
. These are comments that do not end up in the commit and often are automatically generated with long lines, for example in merge commits or with a localized git installation.My configuration
Steps to reproduce:
Result: