Loading coder_sniffer/Drupal/Sniffs/Commenting/InlineCommentSniff.php +5 −1 Original line number Diff line number Diff line Loading @@ -346,7 +346,11 @@ class InlineCommentSniff implements Sniff // Only check the end of comment character if the start of the comment // is a letter, indicating that the comment is just standard text. if (preg_match('/^\p{L}/u', $commentText) === 1) { // Also, when the comment starts with cspell: don't check the end of the // comment. if (preg_match('/^\p{L}/u', $commentText) === 1 && strpos($commentText, 'cspell:') !== 0 ) { $commentCloser = $commentText[(strlen($commentText) - 1)]; $acceptedClosers = [ 'full-stops' => '.', Loading tests/Drupal/Commenting/InlineCommentUnitTest.inc +3 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,9 @@ test(); // 2 spaces instead of one. test(); // cspell:ignore lines starting with cspell: don't need to end with a period test(); /** * Test function. */ Loading tests/Drupal/Commenting/InlineCommentUnitTest.inc.fixed +3 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,9 @@ test(); // 2 spaces instead of one. test(); // cspell:ignore lines starting with cspell: don't need to end with a period test(); /** * Test function. */ Loading tests/Drupal/Commenting/InlineCommentUnitTest.php +3 −3 Original line number Diff line number Diff line Loading @@ -29,9 +29,9 @@ class InlineCommentUnitTest extends CoderSniffUnitTest 24 => 1, 44 => 1, 47 => 1, 59 => 1, 81 => 1, 83 => 1, 62 => 1, 84 => 1, 86 => 1, ]; }//end getErrorList() Loading Loading
coder_sniffer/Drupal/Sniffs/Commenting/InlineCommentSniff.php +5 −1 Original line number Diff line number Diff line Loading @@ -346,7 +346,11 @@ class InlineCommentSniff implements Sniff // Only check the end of comment character if the start of the comment // is a letter, indicating that the comment is just standard text. if (preg_match('/^\p{L}/u', $commentText) === 1) { // Also, when the comment starts with cspell: don't check the end of the // comment. if (preg_match('/^\p{L}/u', $commentText) === 1 && strpos($commentText, 'cspell:') !== 0 ) { $commentCloser = $commentText[(strlen($commentText) - 1)]; $acceptedClosers = [ 'full-stops' => '.', Loading
tests/Drupal/Commenting/InlineCommentUnitTest.inc +3 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,9 @@ test(); // 2 spaces instead of one. test(); // cspell:ignore lines starting with cspell: don't need to end with a period test(); /** * Test function. */ Loading
tests/Drupal/Commenting/InlineCommentUnitTest.inc.fixed +3 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,9 @@ test(); // 2 spaces instead of one. test(); // cspell:ignore lines starting with cspell: don't need to end with a period test(); /** * Test function. */ Loading
tests/Drupal/Commenting/InlineCommentUnitTest.php +3 −3 Original line number Diff line number Diff line Loading @@ -29,9 +29,9 @@ class InlineCommentUnitTest extends CoderSniffUnitTest 24 => 1, 44 => 1, 47 => 1, 59 => 1, 81 => 1, 83 => 1, 62 => 1, 84 => 1, 86 => 1, ]; }//end getErrorList() Loading