mglaman / drupal-check

Check Drupal code for deprecations and discover bugs via static analysis
GNU General Public License v2.0
332 stars 67 forks source link

Meaningless error message #246

Closed TMWagner closed 2 years ago

TMWagner commented 3 years ago

How is drupal-check error?

I've just installed drupal-check using composer as described here on a Drupal 9 site.

I

drupal-check is installed using the phar drupal-check is installed globally via Composer drupal-check is installed globally using consolidation/cgr drupal-check is installed as a dependency to my project

Environment:

Describe the bug I attempted a command used in the examples: vendor/bin/drupal-check -ad --drupal-root=web web/modules/contrib/address

Returned meaningless error messages

Performing deprecation checks
Performing analysis checks
Analyzing path: /Users/thomas.wagner/htdocs/tableau-www/web/modules/contrib/address
Current working directory: /Users/thomas.wagner/htdocs/tableau-www
Using Drupal root: /Users/thomas.wagner/htdocs/tableau-www/web
Using vendor root: /Users/thomas.wagner/htdocs/tableau-www/vendor
Assumed running as global dependency
PHPStan path: /Users/thomas.wagner/htdocs/tableau-www/vendor/phpstan/phpstan/phpstan.phar
PHPStan configuration path: /private/var/folders/0y/1yh6g6356c77lkxxj1v8wsbh0000gq/T/drupal_check_phpstan_1632972522.neon
PHPStan configuration:
parameters:
    tipsOfTheDay: false
    reportUnmatchedIgnoredErrors: false
    excludePaths:
        - */tests/Drupal/Tests/Listeners/Legacy/*
        - */tests/fixtures/*.php
        - */settings*.php
        - */node_modules/*

    ignoreErrors:
        - "#\\Drupal calls should be avoided in classes, use dependency injection instead#"
        - "#Plugin definitions cannot be altered.#"
        - "#Missing cache backend declaration for performance.#"
        - "#Plugin manager has cache backend specified but does not declare cache tags.#"
        - "#Unsafe usage of new static\\(\\)#"

    drupal:
        drupal_root: /Users/thomas.wagner/htdocs/tableau-www/web

    level: 4
    bootstrapFiles:
        - /Users/thomas.wagner/htdocs/tableau-www/vendor/mglaman/drupal-check/error-bootstrap.php

includes:
    - /Users/thomas.wagner/htdocs/tableau-www/vendor/phpstan/phpstan-deprecation-rules/rules.neon
    - /Users/thomas.wagner/htdocs/tableau-www/vendor/mglaman/phpstan-drupal/extension.neon

Executing PHPStan
Configuration parameters excludes_analyse and excludePaths cannot be used at the same time.

Parameter excludes_analyse has been deprecated so use excludePaths only from now on.

Finished executing PHPStan
Unlinking PHPStan configuration
Return PHPStan exit code

Console output Paste the output of the console when running the command with -vvv

mglaman commented 2 years ago

Returned meaningless error messages

Can you explain what is the "meaningless" error message?