Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude Dir option is not working #261

Closed
jonnyeom opened this issue Feb 4, 2022 · 3 comments
Closed

Exclude Dir option is not working #261

jonnyeom opened this issue Feb 4, 2022 · 3 comments

Comments

@jonnyeom
Copy link

jonnyeom commented Feb 4, 2022

How is drupal-check installed?
drupal-check is installed as a dependency to my project

Environment:

  • OS: macOS/Linux
  • PHP Version: 7.4.27
  • Drupal core: 8.x / 9.x

Describe the bug
Exclude dir option is not working for me.
I have tried wildcards, different directories, nothing seems to work.

Console output
Console Output for ./vendor/bin/drupal-check -e web/modules/custom/project_migration web/modules/custom -vvv

Performing deprecation checks
Analyzing path: /Users/jonnyeom/company/project/web/modules/custom
Current working directory: /Users/jonnyeom/company/project
Using Drupal root: /Users/jonnyeom/company/project/web
Using vendor root: /Users/jonnyeom/company/project/vendor
Assumed running as global dependency
PHPStan path: /Users/jonnyeom/company/project/vendor/phpstan/phpstan/phpstan.phar
PHPStan configuration path: /private/var/folders/v4/4p4ywr852ws6ylrt7lv8wx1m0000gn/T/drupal_check_phpstan_1643989173.neon
PHPStan configuration:
parameters:
	tipsOfTheDay: false
	reportUnmatchedIgnoredErrors: false
	excludePaths:
		- web/modules/custom/project_migration
		- */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.#"

	drupal:
		drupal_root: /Users/jonnyeom/company/project/web

	customRulesetUsed: true
	bootstrapFiles:
		- /Users/jonnyeom/company/project/vendor/mglaman/drupal-check/error-bootstrap.php

includes:
	- /Users/jonnyeom/company/project/vendor/phpstan/phpstan-deprecation-rules/rules.neon
	- /Users/jonnyeom/company/project/vendor/mglaman/phpstan-drupal/extension.neon


Executing PHPStan
Result cache not used because the metadata do not match.
 90/90 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%  1 sec/1 sec  76.5 MiB

Result cache was not saved because of non-ignorable exception: Class Drupal\migrate_source_csv\Plugin\migrate\source\CSV not found.
 ------ ----------------------------------------------------------------------
  Line   project_migration/src/Plugin/migrate/source/ProjectGlossary.php
 ------ ----------------------------------------------------------------------
         Class Drupal\migrate_source_csv\Plugin\migrate\source\CSV not found.
         💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
  15     Class Drupal\migrate_source_csv\Plugin\migrate\source\CSV not found.
         💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
 ------ ----------------------------------------------------------------------


...
...


 [ERROR] Found 8 errors

Used memory: 76.5 MB
Finished executing PHPStan
Unlinking PHPStan configuration
Return PHPStan exit code
Thanks for using drupal-check!
...
@mglaman
Copy link
Owner

mglaman commented Feb 4, 2022

parameters:
	tipsOfTheDay: false
	reportUnmatchedIgnoredErrors: false
	excludePaths:
		- web/modules/custom/project_migration

It is in the excludePaths, which makes me think the path needs to be changed.

Try -e */project_migration/*

@jonnyeom
Copy link
Author

jonnyeom commented Feb 4, 2022

Ahhh that worked.
Thanks. This wasnt too clear for me. That worked perfect

@mglaman
Copy link
Owner

mglaman commented Feb 4, 2022

To be fair, I don't know why your original exclusion didn't work either. But if it works it works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants