phpro / grumphp

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

Twigcs fails if the given path doesn't exist #876

Closed MPParsley closed 3 years ago

MPParsley commented 3 years ago
Q A
Version 1.3.1
Bug? ?
New feature? no
Question? no
Documentation? yes
Related tickets -

My configuration

# grumphp.yml
grumphp:
    tasks:
        twigcs:
            path: 'templates'
            severity: 'warning'
            ruleset: 'FriendsOfTwig\Twigcs\Ruleset\Official'
            triggered_by: ['twig']
            exclude: []

Steps to reproduce:

$ vendor/bin/grumphp run --tasks twigcs

Result:

GrumPHP is sniffing your code!
Running tasks with priority 0!
==============================

Running task 1/1: twigcs... ✘

twigcs
======

In ConfigResolver.php line 239:

  The path "templates" is not readable.  
MPParsley commented 3 years ago

The issue is in FriendsOfTwig\Twigcs\Config\ConfigResolver This belongs in friendsoftwig/twigcs.