Tools - refine support for custom binaries and tools installed with phar#234
Merged
Conversation
- it's required only for selecting tool with multiple versions (only phpmetrics at the moment) - suggested tools should check composer or binary - it will be implemented in following commits, current state for not installed tools: [Edge\QA\Task\ParallelExec] Output for "/phpqa/vendor/bin/security-checker" security:check ./composer.lock sh: /phpqa/vendor/bin/security-checker: No such file or directory
It only complicates running tools via phar or running both versions of phpqa It was phpqa error, that phpunit was validated even when phpunit is not used. $ nano .phpqa.yml # add invalid phpunit binary $ phpqa --config tests/.ci --tools phpcs - Before: Invalid phpunit.binary - 'tests/.ci//../../vendor/phpunit/phpunit/phpunita' does not exist. - After: Ok. 1 processes finished running $ phpqa --config tests/.ci --tools phpunit - Before: Invalid phpunit.binary - 'tests/.ci//../../vendor/phpunit/phpunit/phpunita' does not exist. - After if phpunit is installed in composer: 1 processes finished running - After if phpunit is not installed in composer: vendor/bin/invalidphpunit exited with code 127 (it will be displayed as not installed tool when binary is validated)
It does not matter, if it's installed via composer or custom binary.
- escape path in one place - use same builder for running analysis and tools (still missing abstraction, but it's good enough)
$ chmod -x phars/phpmetrics.phar $ phpqa --config tests/.ci --tools phpmetrics -v Before: sh: /phpqa/phars/phpmetrics.phar: Permission denied After: 1 processes finished running, No failed tools
9f54941 to
30e716e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related: #233, 300eb60
internalClass, run phpmetrics v2 from composer and v1 from phar