Skip to content

Commit a446c0b

Browse files
committed
fix upper case Cspell
1 parent c960a5c commit a446c0b

File tree

10 files changed

+16
-17
lines changed

10 files changed

+16
-17
lines changed

coder_sniffer/Drupal/Sniffs/Commenting/DeprecatedSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public function process(File $phpcsFile, $stackPtr)
124124
// automatic fixes for Drupal core, and if the project is missing we are
125125
// assuming it is Drupal core. Deprecations for contrib projects are much
126126
// less frequent and faults can be corrected manually.
127-
// Cspell:ignore xdev .
127+
// cspell:ignore xdev
128128
preg_match('/^(.*)(as of|in) (drupal|)( |:|)+([\d\.\-xdev\?]+)(,| |. |)(.*)(removed|removal)([ |from|before|in|the]*) (drupal|)( |:|)([\d\-\.xdev]+)( |,|$)+(?:release|)(?:[\.,])*(.*)$/i', $text1, $matchesFix);
129129

130130
if (count($matchesFix) >= 12) {

coder_sniffer/Drupal/Sniffs/Commenting/DocCommentSniff.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ public function process(File $phpcsFile, $stackPtr)
383383
// A tag group is one where there are no blank lines between tags.
384384
// The param tag group is special as it requires all @param tags to be inside.
385385
$tagGroups = [];
386-
// Cspell:ignore groupid .
386+
// cspell:ignore groupid
387387
$groupid = 0;
388388
$paramGroupid = null;
389389
$currentTag = null;
@@ -507,12 +507,12 @@ public function process(File $phpcsFile, $stackPtr)
507507
}
508508
}//end foreach
509509

510-
// If there is a param group, it needs to be first; with the exception of
511-
// @code, @todo and link tags.
510+
// If there is a param group, it needs to be first; with the exception
511+
// of @code, @todo and link tags.
512512
if ($paramGroupid !== null && $paramGroupid !== 0
513513
&& in_array($tokens[$tokens[$commentStart]['comment_tags'][0]]['content'], ['@code', '@todo', '@link', '@endlink', '@codingStandardsIgnoreStart']) === false
514514
// In JSDoc we can have many other valid tags like @function or
515-
// @constructor before the param tags.
515+
// tags like @constructor before the param tags.
516516
&& $phpcsFile->tokenizerType !== 'JS'
517517
) {
518518
$error = 'Parameter tags must be defined first in a doc comment';

coder_sniffer/Drupal/Sniffs/Commenting/FileCommentSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ public function process(File $phpcsFile, $stackPtr)
225225
&& $tokens[$next]['code'] === T_CLOSE_TAG
226226
) {
227227
$error = 'There must be no blank line after the file comment in a template';
228-
// Cspell:ignore TeamplateSpacingAfterComment .
228+
// cspell:ignore TeamplateSpacingAfterComment
229229
$fix = $phpcsFile->addFixableError($error, $commentEnd, 'TeamplateSpacingAfterComment');
230230
if ($fix === true) {
231231
$phpcsFile->fixer->beginChangeset();

coder_sniffer/Drupal/Sniffs/Commenting/FunctionCommentSniff.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class FunctionCommentSniff implements Sniff
2727
/**
2828
* A map of invalid data types to valid ones for param and return documentation.
2929
*
30-
* Cspell:ignore TRUEFALSE
30+
* cspell:ignore TRUEFALSE
3131
*
3232
* @var array<string, string>
3333
*/
@@ -442,7 +442,7 @@ protected function processThrows(File $phpcsFile, $stackPtr, $commentStart)
442442
$comment .= ' '.$tokens[$i]['content'];
443443
if ($indent < 3) {
444444
$error = 'Throws comment indentation must be 3 spaces, found %s spaces';
445-
// Cspell:ignore TrhowsCommentIndentation .
445+
// cspell:ignore TrhowsCommentIndentation
446446
$phpcsFile->addError($error, $i, 'TrhowsCommentIndentation', [$indent]);
447447
}
448448
}
@@ -772,7 +772,7 @@ protected function processParams(File $phpcsFile, $stackPtr, $commentStart)
772772
$content .= $param['var'];
773773
$content .= str_repeat(' ', $param['var_space']);
774774
// At this point there is no description expected in the
775-
// @param line so no need to append comment.
775+
// param line so no need to append comment.
776776
$phpcsFile->fixer->replaceToken(($param['tag'] + 2), $content);
777777

778778
// Fix up the indent of additional comment lines.

coder_sniffer/Drupal/Sniffs/Commenting/HookCommentSniff.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ public function process(File $phpcsFile, $stackPtr)
9393
) {
9494
$phpcsFile->addWarning('Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements hook_foo_BAR_ID_bar() for xyz-bar.html.twig.", "* Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or "* Implements hook_foo_BAR_ID_bar() for block templates."', $short, 'HookCommentFormat');
9595
} else {
96-
// Check that a hook implementation does not duplicate @param and
97-
// @return documentation.
96+
// Check that a hook implementation does not duplicate param and
97+
// return documentation.
9898
foreach ($tokens[$commentStart]['comment_tags'] as $pos => $tag) {
9999
if ($tokens[$tag]['content'] === '@param') {
100100
$warn = 'Hook implementations should not duplicate @param documentation';

coder_sniffer/Drupal/Sniffs/Commenting/InlineCommentSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ public function process(File $phpcsFile, $stackPtr)
351351
// Also, when the comment starts with cspell: don't check the end of the
352352
// comment.
353353
if (preg_match('/^\p{L}/u', $commentText) === 1
354-
&& preg_match('/(cspell|spell\-checker):ignore/i', $commentText) === 0
354+
&& preg_match('/(cspell|spell\-checker):/i', $commentText) === 0
355355
) {
356356
$commentCloser = $commentText[(strlen($commentText) - 1)];
357357
$acceptedClosers = [

coder_sniffer/Drupal/Sniffs/Functions/DiscouragedFunctionsSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class DiscouragedFunctionsSniff extends ForbiddenFunctionsSniff
5959
'fnmatch' => null,
6060
// Functions which are a security risk.
6161
'eval' => null,
62-
// Cspell:enable .
62+
// cspell:enable
6363
];
6464

6565
/**

coder_sniffer/Drupal/Sniffs/InfoFiles/ClassFilesSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public function process(File $phpcsFile, $stackPtr)
8080

8181
$ptr = self::getPtr('files[]', $file, $phpcsFile);
8282
$error = "It's only necessary to declare files[] if they declare a class or interface.";
83-
// Cspell:ignore UnecessaryFileDeclaration .
83+
// cspell:ignore UnecessaryFileDeclaration
8484
$phpcsFile->addError($error, $ptr, 'UnecessaryFileDeclaration');
8585
}//end foreach
8686
}//end if

coder_sniffer/Drupal/Sniffs/Semantics/FunctionAliasSniff.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,14 +161,13 @@ class FunctionAliasSniff extends FunctionCall
161161
'snmpwalkoid' => 'snmprealwalk',
162162
'strchr' => 'strstr',
163163
'xptr_new_context' => 'xpath_new_context',
164+
// cspell:enable
164165
];
165166

166167

167168
/**
168169
* Returns an array of function names this test wants to listen for.
169170
*
170-
* Cspell:enable
171-
*
172171
* @return array<string>
173172
*/
174173
public function registerFunctionNames()

coder_sniffer/DrupalPractice/Sniffs/General/OptionsTSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public function process(File $phpcsFile, $stackPtr)
127127
$afterValue = $phpcsFile->findNext(T_WHITESPACE, ($arrayValue + 1), $statementEnd, true);
128128
if ($tokens[$afterValue]['code'] === T_COMMA || $tokens[$afterValue]['code'] === T_CLOSE_PARENTHESIS) {
129129
$warning = '#options values usually have to run through t() for translation';
130-
// Cspell:ignore TforValue .
130+
// cspell:ignore TforValue
131131
$phpcsFile->addWarning($warning, $arrayValue, 'TforValue');
132132
}
133133
}

0 commit comments

Comments
 (0)