phpcs custom_coding_standard from dependency in vendor/
john-n-smith opened this issue · 4 comments
We keep our phpcs standard in a separate repository as it's used across multiple projects. It can then be installed and it's version managed via composer.
As dependencies aren't installed when phpcs is ran, a config like the following fails:
checks:
php:
custom_coding_standard:
ruleset_path: 'vendor/bin/graze/standards/phpcs.xml'
Example failure here.
Is there a configuration directive to trigger dependency installation before code analysis, or the possibility of adding one?
This gives a single place to define phpcs' --standard for both scrutinizer and editors, rather than having to use the git_version
directive.
Yes, that is possible. We have some docs on this here:
https://scrutinizer-ci.com/docs/tools/php/code-sniffer/
Is there any way to reference the ruleset.xml from an installed dependency, rather than the git_version
directive?
That means the dependancy is managed via composer, using version numbers, rather than hashes and means the the standard is defined in a single place for use by scrutinizer, running phpcs locally, and editors (via a phpcs.xml
in the root of the project).
Unfortunately, not at the moment. We will soon have something for this :)
Great, I'll keep an eye out. Thanks for the great service.