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

Passes repo.root into filterFileListByFileSet target #446

Merged

Conversation

steveworley
Copy link
Contributor

The git pre-commit hook builds a list of file paths relative to the git root which looks like:

docroot/modules/custom/test.php

When the validate:phpcs:files target builds a list of files to sniff it attempts to prepend the repository root to the relative path given by git diff. When run from a project the application call returns a path to the vendor directory.

$this->project->getBasedir()->getAbsolutePath(); 

Which produces output like:

array(1) {
  [0]=>
  string(87) "/Users/steven.worley/repos/blt2/vendor/acquia/blt/phing/docroot/modules/custom/test.php"
}

This then causes the array intersect validation to fail resulting in no files given to phpcs.

filterFileListByFileSet was producing erroneous file paths when determining which files to sniff.
@grasmash grasmash merged commit cb00764 into acquia:8.x Sep 23, 2016
@grasmash grasmash added the Bug Something isn't working label Sep 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants