phpro / grumphp

A PHP code-quality tool
MIT License
4.14k stars 430 forks source link

git_commit_message: unsupported options #378

Closed flyke closed 7 years ago

flyke commented 7 years ago
Q A
Version 0.11.6
Bug? yes
New feature? no
Question? no
Documentation? yes
Related tickets comma-separated list of related tickets

My configuration

parameters:
    git_dir: .
    bin_dir: vendor/bin
    tasks:
        git_commit_message:
            allow_empty_message: false
            enforce_capitalized_subject: true
            enforce_no_subject_trailing_period: true
            enforce_single_lined_subject: true
            max_body_width: 72
            max_subject_width: 60
            matchers:
                Must contain JIRA issue number: /JIRA-\d+/
            case_insensitive: true
            multiline: true
            additional_modifiers: ''

Steps to reproduce:

# Generate empty folder
mkdir tmp
cd tmp
git init
echo "vendor" > .gitignore
pbpaste > grumphp.yml
composer require --dev phpro/grumphp

# Your actions
# Please add the steps on how to reproduce the issue here.

# Run GrumpHP:
git add -A && git commit -m"Test"
# or
./vendor/bin/grumphp run

Result:

Running task 1/1: CommitMessage...

  [Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException]
  The options "allow_empty_message", "enforce_capitalized_subject", "enforce_no_subject_trailing_period", "enforce_single_lined_subject", "max_body_width", "max_subject_width" do not exist. Defined options are: "additional_modifiers", "case_insensitive", "matchers", "multiline".
veewee commented 7 years ago

Those are options for version 0.12.0 which isn't tagged yet. https://github.com/phpro/grumphp/milestone/18?closed=1 https://github.com/phpro/grumphp/pull/369