Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Create file test.php:
/**
* @file
* Foo.
*
* Foo bar.
*/
/**
* Example of the problem.
*/
function foo() {
// @ignore Drupal.Commenting.InlineComment.SpacingBefore:function
// Bar.
}
Then:
$ drupalcs -s test.php
FILE: /var/www/html/drupal7/sites/all/modules/foo/test.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
15 | ERROR | Comment indentation error, expected only 1 spaces
| | (Drupal.Commenting.InlineComment.SpacingBefore)
----------------------------------------------------------------------
Time: 34ms; Memory: 5.75Mb
Yet the documentation at https://www.drupal.org/node/144172 suggests the @ignore is correct:
$a = 'nothing ignored yet';
/**
* My function
*/
function my_function() {
// @ignore rule:function
$b = 'the rule is ignored';
}
$c = 'the rule is no longer ignored';
function your_function() {
$d = 'of course the rule is not ignored here either';
}
Comments
Comment #2
AohRveTPV CreditAttribution: AohRveTPV commentedComment #3
AohRveTPV CreditAttribution: AohRveTPV commentedComment #4
AohRveTPV CreditAttribution: AohRveTPV commentedCoder 8.x-2.x does not support @ignore. I was confused by the documentation because it says "User Reference for Coder module in D7 and D6". I thought that applied since I was using Coder 8.x-2.x on a D7 site. But I understand now it is referring to Coder 6.x and 7.x.