-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Silverstripe Backend Standards for the Bespoke Squads.
This package contains some tools and a predefined ruleset that we use in our Silverstripe Bespoke teams
This package also utilises the following third-party tools:
What is the Goal of this module?
Simply put, this module aims to centralize, maintain and handle all the details relating to coding standards for the Silverstripe Bespoke teams.
A fully implemented code base will have no specifics about coding standards present within it.
Currently, this is focusing on PHP with a Silverstripe framework in mind.
This may change in the future. π
You'll find more detailed instructions on the installation page
A note for Silverstripe staff
β οΈ If you're a Silverstripe staff member and looking to add this to an existing project please check out the details on confluence for specific instructions for our projects
These scripts are as follows:
Check if the code complies with the Silverstripe Bespoke Coding Standards.
vendor/bin/bespoke-phpcs
Fix errors automatically, where possible. (using phpcbf
under the hood)
vendor/bin/bespoke-phpcbf
Check the syntax of PHP files.
vendor/bin/bespoke-lint
In most cases, these will already be configured (See installation for an example) in the composer.json
scripts area and can be run as per the table below.
type | code sniff | code fix | code lint |
---|---|---|---|
raw command | vendor/bin/bespoke-phpcs |
vendor/bin/bespoke-phpcbf |
vendor/bin/bespoke-lint |
composer equivalent | composer run phpcs |
composer run phpcbf |
composer run php-lint |
- Silverstripers! π (That's you if you're reading this!)
- Anyone is welcome to contribute to the package and open Pull Request.
- Pull requests will only be approved by a Principal Dev/Tech Leads
- How to create a custom sniff
- License