swisnl / phpcs-bitbucket
PHP_CodeSniffer reporter for Bitbucket Pipeline Reports
Installs: 787
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 0
Open Issues: 0
Type:phpcs-extension
Requires
- php: ^8.0
- ext-json: *
- squizlabs/php_codesniffer: ^3.0
- swisnl/bitbucket-reports: ^0.1
Requires (Dev)
- laravel/pint: ^1.2
README
This PHP_CodeSniffer error reporter will add annotations in Bitbucket, for example in pull requests.
Installation
Via Composer
composer require --dev swisnl/phpcs-bitbucket
Usage
This reporter can only be used within a Bitbucket Pipeline, so the recommended way to use it is via the command-line interface in your bitbucket-pipelines.yml
:
phpcs --report="\Swis\PHP_CodeSniffer\Reporter\BitbucketReporter"
Alternatively you can specify the reporter in .phpcs.xml
:
<?xml version="1.0"?> <ruleset name="project"> <arg name="report" value="\Swis\PHP_CodeSniffer\Reporter\BitbucketReporter"/> </ruleset>
Class not found error
If the reporter class can't be found, you might need to specify the path to the Composer autoloader.
Via command-line interface:
phpcs --bootstrap=vendor/autoload.php
Or using config:
<?xml version="1.0"?> <ruleset name="project"> <autoload>vendor/autoload.php</autoload> </ruleset>
Screenshots
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please email security@swis.nl instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
This package is Treeware. If you use it in production, then we ask that you buy the world a tree to thank us for our work. By contributing to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.
SWIS ❤️ Open Source
SWIS is a web agency from Leiden, the Netherlands. We love working with open source software.