[Obsolete] Spelling
This documentation is deprecated.
The standards have moved to GitLab pages, Drupal coding standards.
Drupal Core uses US English spelling for all source code, including comments and names.
Core code is automatically checked for spelling by CSpell.
Spelling of CSpell
For in line documentation settings use all lower case for cspell. For example, // cspell:ignore.
Ignore word(s) in a file
Use the cspell:ignore directive. The words are listed alphabetically with a single space between the words. Use multiple lines to meet the number of characters per line limit.
<?php
// cspell:ignore first-word second-word
Disable CSpell by line
if it's not in English or a nonsense string (for example, a random string in a test) disable CSpell for that line. Note that cspell is lower case.
<?php
// cspell:disable-next-line
$token = 'PxOHfS_QL-T01NjBgu7Z7I04tIwMp6La5vM-mVxezbU';
use Drupal\foo\Bar;
Disable CSpell for multiple lines
For multiple lines, use disable before the lines and enable after. Note that cspell is lower case.
<?php
// cspell:disable
$lorem1 = 'Lorem ipsum dolor sit amet in libero.';
$lorem2 = 'Ut fermentum est vitae metus orci.';
// cspell:enableSee the cspell development tool page for more details.
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion