Using Coder and PHP_CodeSniffer in GitLab CI

This documentation covers adding a phpcs.xml file to your contributed project.

What the GitLab CI test runner does

The default .gitlab-ci.yml runs PHP_CodeSniffer using the Drupal coding standard from the Coder project.

If you want to disable PHP_CodeSniffer, set the SKIP_PHPCS: '1' variable in your .gitlab-ci.yml file.

Accessibility Coding Standards

The Drupal community strives to be inclusive to everyone, including people with disabilities. To that end, the Drupal community has developed the following accessibility coding standards to help make websites and other digital assets accessible to the widest possible audience.

Key Goals

Effective user experiences serve our entire community, including website visitors with disabilities. A positive experience can be achieved by focusing on three goals:

[Obsolete] PHP

PHP coding standards.

Changes to Drupal coding standards are proposed and discussed in issues in the Coding Standards project.

The Drupal coding standards for PHP.

PHP standards are enforced using PHP_CodeSniffer. The rules used are from that project as well as the Drupal coder project and Slevomat.

[Obsolete] SQL

SQL best practices for Drupal.

The standards have moved to GitLab pages, Drupal coding standards.

SQL best practices for Drupal.

[Obsolete] JavaScript coding standards

JavaScript coding standards and best practices for Drupal.

Note: Changes to Drupal coding standards are proposed and discussed in issues in the Coding Standards project.

JavaScript coding standards and best practices for Drupal.

[Obsolete] CSS

CSS coding standards and best practices.

The standards have moved to GitLab pages, Drupal coding standards.

CSS coding standards and best practices for Drupal.

Pages

Subscribe with RSS Subscribe to RSS - coding standards